/* DRAMORY sites — shared layout (office.dramory.ai and dramory.ai). Colours, faces, sizes: tokens.css only.
 * Same file in xHwp site/office/public/static/site.css (office.dramory.ai) — keep the two in step. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.72 var(--font-sans);
  letter-spacing: -0.006em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.25; text-wrap: balance; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-fg); }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--fg); color: var(--bg); padding: 0.5rem 0.75rem; z-index: 50; border-radius: var(--radius); }
.skip:focus { left: 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 52rem; }

/* ─── header ─── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--fg); padding-block: 0.5rem; }
.logo {
  display: block;
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
.logo-dramory { --logo: url("dramory-horizontal.svg"); width: 7.4rem; aspect-ratio: 2000 / 290; }
.logo-office { --logo: url("dramory-office-horizontal.svg"); width: 10.6rem; aspect-ratio: 3184 / 290; }
.logo-symbol { --logo: url("dramory-symbol.svg"); aspect-ratio: 634 / 640; }
.nav { display: flex; align-items: center; gap: clamp(0.35rem, 1.2vw, 1.1rem); font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--fg-muted); padding: 0.45rem 0.35rem; border-radius: var(--radius); }
.nav a:hover { color: var(--fg); }
.nav .lang { font-weight: 600; letter-spacing: 0.04em; color: var(--fg); }
.nav .button { padding: 0.5rem 0.95rem; font-size: var(--step--1); color: var(--accent-fg); margin-left: 0.35rem; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0;
  border: 0; background: none; color: var(--fg-muted); cursor: pointer; border-radius: 50%;
}
.theme-toggle:hover { color: var(--fg); background: var(--accent-soft); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.no-js .theme-toggle { display: none; }
@media (max-width: 52rem) { .nav .hide-md { display: none; } }
@media (max-width: 30rem) { .nav .hide-sm { display: none; } .logo-office { width: 9.2rem; } }

/* ─── text ─── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--step--2); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 1px; background: currentColor; opacity: 0.6; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.028em; line-height: 1.14; }
.title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); letter-spacing: -0.022em; line-height: 1.22; }
.lede { font-size: var(--step-1); color: var(--fg-muted); max-width: var(--measure); line-height: 1.78; }
.muted { color: var(--fg-muted); }
.small { font-size: var(--step--1); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow .arrow { transition: transform 0.2s ease; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ─── buttons ─── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 2.75rem; padding: 0.7rem 1.3rem; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-fg); border: 1px solid transparent;
  text-decoration: none; font-weight: 600; font-size: var(--step-0); line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.button:hover { background: color-mix(in srgb, var(--accent) 88%, var(--fg)); }
.button.ghost { background: transparent; color: var(--fg); border-color: var(--rule-strong); }
.button.ghost:hover { border-color: var(--fg); background: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ─── sections ─── */
.section { padding-block: var(--space-section); }
.section.ruled { border-top: 1px solid var(--rule); }
.section.tight { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2.5vw, 4rem); }
.section-head .eyebrow { margin-bottom: 1.25rem; }
.section-head .title + .lede { margin-top: 1.25rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head.center .lede { margin-inline: auto; }

/* dark band */
.band {
  background: var(--bg-deep); color: var(--fg-on-deep);
  /* the band is dark in both themes: figures inside it use the dark art palette */
  --accent: #8CC5AC; --accent-soft: rgba(140, 197, 172, 0.12); --accent-fg: #0C1512; --warm: #D9955E;
  --fg: var(--fg-on-deep); --fg-muted: var(--fg-on-deep-muted); --fg-faint: #8FA098; --rule: rgba(230, 236, 232, 0.12);
  --bg-raised: #0F1D18; --art-paper: #16231F; --art-ink: #E6ECE8; --art-line: rgba(230, 236, 232, 0.32); --art-grid: rgba(140, 197, 172, 0.26);
}
.band .lede, .band .muted { color: var(--fg-on-deep-muted); }
.band .button.ghost { color: var(--fg-on-deep); border-color: rgba(232, 238, 234, 0.4); }
.band .button.ghost:hover { border-color: var(--fg-on-deep); }

/* split: text beside a figure */
.split { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 5rem); align-items: center; }
.split + .split { margin-top: var(--space-section); }
.split-text h3 { font-family: var(--font-display); font-size: var(--step-3); letter-spacing: -0.022em; line-height: 1.22; margin: 1rem 0 1.1rem; }
.split-text .title { margin: 1.1rem 0 1.2rem; }
.split-text p { color: var(--fg-muted); max-width: 32rem; }
.split-text p + p { margin-top: 0.9rem; }
.split-text .points { margin-top: 1.5rem; display: grid; gap: 0.6rem; padding: 0; list-style: none; }
.split-text .points li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.5rem; color: var(--fg); font-size: var(--step--1); }
.split-text .actions { margin-top: 2rem; }
.split-text .points li::before { content: ""; width: 0.5rem; height: 1px; background: var(--accent); margin-top: 0.8rem; }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split.flip .split-text { order: 2; }
}

/* figures (inline SVG art, screenshots) */
.plate { margin: 0; border-radius: var(--radius-lg); background: var(--bg-raised); border: 1px solid var(--rule); padding: clamp(1rem, 0.5rem + 2vw, 2.25rem); }
.plate svg { width: 100%; height: auto; }
.plate figcaption, .caption { margin-top: 0.9rem; font-size: var(--step--2); letter-spacing: 0.02em; color: var(--fg-faint); }

/* cards */
.cards { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; list-style: none; padding: 0; }
.cards > li { background: var(--bg); padding: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); }
.cards h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; margin: 1rem 0 0.5rem; }
.cards p { color: var(--fg-muted); font-size: var(--step--1); line-height: 1.75; }
.cards .icon { width: 1.75rem; height: 1.75rem; color: var(--accent); }
.split + .cards { margin-top: clamp(4rem, 3rem + 4vw, 6.5rem); }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* facts table (company info) */
.facts { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--rule-strong); }
.facts div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--fg-muted); font-size: var(--step--1); padding-top: 0.1rem; }
.facts dd { margin: 0; }
.facts .todo { color: var(--fg-faint); }
@media (min-width: 52rem) { .facts { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; } }

/* closing call */
.closing { text-align: center; }
.closing .display { font-size: var(--step-4); max-width: 18ch; margin-inline: auto; }
.closing .lede { margin: 1.5rem auto 0; }
.closing .actions { justify-content: center; margin-top: 2.25rem; }

/* ─── footer ─── */
.site-footer { border-top: 1px solid var(--rule); padding-block: 3rem calc(3rem + env(safe-area-inset-bottom, 0px)); font-size: var(--step--1); color: var(--fg-muted); }
.site-footer .wrap { display: grid; gap: 2rem; }
.site-footer .foot-brand { display: grid; gap: 0.9rem; align-content: start; }
.site-footer .foot-brand .logo { color: var(--fg); }
.site-footer .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.site-footer h2 { font-size: var(--step--2); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.site-footer .legal { border-top: 1px solid var(--rule); padding-top: 1.5rem; display: grid; gap: 0.4rem; font-size: var(--step--2); line-height: 1.7; color: var(--fg-faint); }
@media (min-width: 52rem) {
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .site-footer .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .legal { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
