/* Sedir Studio sites. Palette comes from the Mist Journal icon:
   cool paper, charcoal ink, slate, moss. */

@font-face {
  font-family: "Literata";
  src: url("/shared/fonts/literata-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("/shared/fonts/literata-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  src: url("/shared/fonts/literata-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("/shared/fonts/literata-latin-ext-wght-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/shared/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/shared/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f2f4f7;
  --sheet: #ffffff;
  --ink: #222831;
  --slate: #5d6471;
  --rule: #d9dde3;
  --moss: #529132;
  --moss-ink: #3a6e1f;
  --sheet-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(34, 40, 49, 0.28);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --measure: 66ch;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b2027;
    --sheet: #242a33;
    --ink: #e8eaee;
    --slate: #a3a9b4;
    --rule: #333a45;
    --moss: #6db24f;
    --moss-ink: #93cd78;
    --sheet-shadow: 0 1px 0 #2d333d, 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--moss-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; border-radius: 2px; }

img { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header and footer ---------- */

.site-header { padding: 22px 0; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 500 1.15rem/1 var(--serif);
}
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px var(--rule); }

.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.95rem; }
.site-nav a { color: var(--slate); text-decoration: none; padding: 4px 0; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--moss); }
.site-nav .lang { margin-left: 4px; }

.site-footer {
  margin-top: 96px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--rule);
  color: var(--slate);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer a { color: var(--slate); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* ---------- Shared type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); }

h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 12px;
}

p { margin: 0 0 1em; }

.lead { font-size: 1.2rem; line-height: 1.55; color: var(--slate); max-width: 34ch; }

/* ---------- Journal home: the open-book spread ---------- */

.spread {
  display: grid;
  gap: 40px;
  padding: 40px 0 24px;
  align-items: center;
}
.spread-text .note { color: var(--slate); font-size: 0.95rem; margin-top: 28px; }

.sheet {
  position: relative;
  background: var(--sheet);
  border-radius: 6px 18px 18px 6px;
  box-shadow: var(--sheet-shadow);
  padding: 32px 30px 26px 36px;
  max-width: 520px;
  margin: 0;
}
/* The spine: a soft fold along the left edge, like the icon's right-hand page. */
.sheet::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 18px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(to right, rgba(34, 40, 49, 0.07), transparent);
  pointer-events: none;
}
.sheet .date {
  font: 500 0.95rem/1.3 var(--sans);
  color: var(--slate);
  margin: 0 0 14px;
}
.sheet .entry {
  font: 400 1.22rem/1.75 var(--serif);
  margin: 0 0 22px;
  min-height: 7em;
}
.sheet .entry .w { opacity: 0; transition: opacity 260ms ease; }
.sheet .entry .w.on { opacity: 1; }
.sheet .entry.static .w { opacity: 1; transition: none; }

.mic {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--slate);
  font-size: 0.9rem;
}
.mic .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--moss);
  flex: none;
}
.mic.live .dot { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.5); opacity: 0.55; } }

/* ---------- Journal home: where your journal lives ---------- */

.lives { padding-top: 72px; max-width: 860px; }
.lives > h2 { margin-bottom: 8px; }
.lives > p { color: var(--slate); margin-bottom: 28px; }
.lives dl { margin: 0; border-top: 1px solid var(--rule); }
.lives .row {
  display: grid;
  gap: 4px 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.lives dt { font: 500 1.1rem/1.4 var(--serif); }
.lives dd { margin: 0; color: var(--slate); }

.inside { padding-top: 72px; max-width: 860px; }
.inside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px 32px;
}
.inside li { padding: 10px 0 10px 22px; position: relative; }
.inside li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 8px;
  height: 8px;
  border-radius: 8px 0 8px 0;
  background: var(--moss);
}

/* ---------- Long-form pages: privacy, terms, support ---------- */

.doc { display: grid; gap: 32px; padding: 32px 0 0; }
.doc-head { max-width: var(--measure); }
.doc-head h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); margin-bottom: 10px; }
.doc-head .updated { color: var(--slate); font-size: 0.95rem; margin: 0; }

.summary {
  max-width: var(--measure);
  margin: 0;
  padding: 18px 22px;
  background: var(--sheet);
  border-radius: 4px 14px 14px 4px;
  box-shadow: var(--sheet-shadow);
  font: 400 1.12rem/1.65 var(--serif);
}

.toc { font-size: 0.95rem; }
.toc summary { cursor: pointer; color: var(--slate); padding: 6px 0; }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; }
.toc li a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 1.5px solid var(--rule);
  color: var(--slate);
  text-decoration: none;
}
.toc li a:hover { color: var(--ink); border-left-color: var(--moss); }

.doc-body { max-width: var(--measure); }
.doc-body section { padding-top: 12px; margin-bottom: 30px; scroll-margin-top: 24px; }
.doc-body h2 { font-size: 1.35rem; }
.doc-body .intro { font-size: 1.1rem; }
.doc-body ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc-body li { margin-bottom: 6px; }
.doc-body li::marker { color: var(--moss); }

.contact-big {
  font: 500 clamp(1.4rem, 1.1rem + 1.4vw, 2rem)/1.2 var(--serif);
  margin: 6px 0 0;
  word-break: break-word;
}

/* ---------- Studio home ---------- */

.studio { padding: 56px 0 0; max-width: 860px; }
.studio h1 { max-width: 15ch; }
.studio .lead { max-width: 44ch; }

.apps { margin-top: 64px; border-top: 1px solid var(--rule); }
.app {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.app picture { grid-row: span 3; }
.app img { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 0 0 1px var(--rule); }
.app h2 { margin: 2px 0 0; font-size: 1.5rem; }
.app h2 a { color: var(--ink); text-decoration: none; }
.app h2 a:hover { text-decoration: underline; text-decoration-color: var(--moss); }
.app p { margin: 0; color: var(--slate); }
.app .links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; margin-top: 6px; }

.reach { margin-top: 64px; }
.reach p { color: var(--slate); margin-bottom: 4px; }

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .lives .row { grid-template-columns: 200px 1fr; }
  .inside ul { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .spread {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    padding: 72px 0 32px;
  }
  .sheet { justify-self: end; width: 100%; }

  .doc {
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 64px;
    align-items: start;
  }
  .doc-head, .summary, .doc-body { grid-column: 2; }
  .toc { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 24px; }
  .toc summary { display: none; }
  .toc ol { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mic.live .dot { animation: none; }
  .sheet .entry .w { opacity: 1; transition: none; }
}
