/* DocuMela website. Colours come from the app icon: three sheets of paper. */
:root {
  --ink: #141a2b;
  --soft: #55607a;
  --paper: #ffffff;
  --desk: #e9edf5;
  --line: #cfd6e4;
  --blue: #2f5bea;
  --orange: #f2762e;
  --green: #1e9e5a;
  --red: #e5484d;
  --display: "Bricolage Grotesque", "Noto Sans Ethiopic", system-ui, sans-serif;
  --body: "Noto Sans", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f8;
    --soft: #a8b2c8;
    --paper: #1b2130;
    --desk: #10141d;
    --line: #333c50;
    --blue: #8aa5ff;
    --orange: #ff9a5c;
    --green: #4fd08a;
    --red: #ff7a7e;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, [contenteditable]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* ---------- top bar ---------- */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
         font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- headings ---------- */
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: 1.2rem; color: var(--soft); }

/* ---------- hero ---------- */
.hero { padding: 36px 0 84px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 span { display: block; }
.hero .lead { margin-top: 22px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 14px;
  background: var(--ink); color: var(--desk); text-decoration: none;
  padding: 14px 22px; border-radius: 12px; font-weight: 600; font-size: 1.05rem;
}
.store svg { width: 22px; height: 22px; flex: none; }
.store:hover { background: var(--blue); color: #fff; }
.meaning { margin-top: 26px; font-size: 0.98rem; color: var(--soft); }
.meaning b { color: var(--ink); }

/* The demo: three sheets, the top one can be edited. */
.stack { position: relative; padding: 26px 26px 0 0; }
.stack::before, .stack::after {
  content: ""; position: absolute; border-radius: 16px;
  inset: 0 0 26px 26px; background: var(--green);
}
.stack::after { inset: 13px 13px 13px 13px; background: var(--orange); }
.sheet {
  position: relative; z-index: 1; background: var(--paper); border-radius: 16px;
  padding: 26px 26px 18px; box-shadow: 0 0 0 4px var(--desk);
}
.sheet .bar { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 0.86rem;
              padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet .bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.sheet .bar .state { margin-left: auto; font-weight: 600; color: var(--green); }
.sheet .bar .state.changed { color: var(--orange); }
.sheet [contenteditable] {
  border-radius: 8px; padding: 6px 8px; margin: 0 -8px 4px; max-width: none;
  cursor: text; transition: background-color .15s;
}
.sheet [contenteditable]:hover { background: color-mix(in srgb, var(--blue) 9%, transparent); }
.sheet [contenteditable]:focus { background: color-mix(in srgb, var(--blue) 13%, transparent); }
.sheet .title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; }
.sheet .hint { margin: 12px 0 0; font-size: 0.9rem; color: var(--soft); }

/* ---------- sections ---------- */
.band { padding: 76px 0; }
.band.paper { background: var(--paper); }
.band h2 + .lead { margin-top: 14px; }

/* File types as folder tabs. */
.tabs { display: flex; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.tabs button {
  font: inherit; font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  border: 0; cursor: pointer; padding: 12px 22px; border-radius: 12px 12px 0 0;
  background: color-mix(in srgb, var(--tab) 16%, var(--paper)); color: var(--ink);
}
.tabs button[aria-selected="true"] { background: var(--tab); color: #fff; }
.panel {
  border-top: 6px solid var(--tab); background: var(--desk); border-radius: 0 16px 16px 16px;
  padding: 30px; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 36px;
}
.band.paper .panel { background: var(--desk); }
.panel[hidden] { display: none; }
.panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.panel li { padding-left: 26px; position: relative; }
.panel li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 14px; height: 3px;
                    border-radius: 2px; background: var(--tab); }
.panel .verb { font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.panel .note { color: var(--soft); font-size: 0.95rem; margin-top: 12px; }

/* Three promises. */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px;
            border-top: 2px solid var(--ink); }
.promises div { padding: 22px 26px 4px 0; }
.promises div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.promises h3 { margin-bottom: 8px; }
.promises p { color: var(--soft); font-size: 0.98rem; }

/* Themes. */
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 36px; }
.themes figure { margin: 0; }
.themes img { border-radius: 8px; border: 1px solid var(--line); aspect-ratio: 16 / 9; width: 100%; }
.themes figcaption { font-size: 0.9rem; color: var(--soft); margin-top: 6px; }

/* Conversions: from -> to pairs. */
.convert { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin-top: 30px; }
.convert div { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.convert .from { font-family: var(--display); font-weight: 700; min-width: 7.2em; }
.convert .to { font-family: var(--display); font-weight: 700; color: var(--blue); }
.convert .what { color: var(--soft); font-size: 0.95rem; margin-left: auto; text-align: right; }

.limits { margin: 26px 0 0; padding-left: 20px; color: var(--soft); max-width: 66ch; }
.limits li { margin-bottom: 8px; }

/* ---------- text pages ---------- */
.page { padding: 28px 0 80px; }
.page h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page .date { color: var(--soft); margin-top: 10px; }
.page section { background: var(--paper); border-radius: 16px; padding: 24px 28px; margin-top: 18px; max-width: 800px; }
.page section h2 { font-size: 1.3rem; margin-bottom: 10px; }
.page section p, .page section li { max-width: 68ch; }
.page section ul, .page section ol { margin: 0 0 1em; padding-left: 22px; }
.page section li { margin-bottom: 6px; }
.page section > :last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
footer { padding: 34px 0 44px; color: var(--soft); font-size: 0.95rem; }
footer .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--soft); }
footer .right { margin-left: auto; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-bottom: 60px; }
  .panel { grid-template-columns: 1fr; gap: 18px; padding: 22px; border-radius: 0 0 16px 16px; }
  .promises { grid-template-columns: 1fr; }
  .promises div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .convert { grid-template-columns: 1fr; }
  .convert .what { display: none; }
  .band { padding: 56px 0; }
  .top nav { gap: 14px; font-size: 0.95rem; }
  .tabs { gap: 4px; flex-wrap: nowrap; }
  .tabs button { padding: 11px 12px; font-size: 0.95rem; flex: 1 1 auto; }
}
