/* syuzana.com — design tokens from specs/design-system.md (warm paper · charcoal · crimson). */

:root {
  --paper: #f3eee6;
  --paper-2: #e9e2d6;
  --ink: #1e1a19;
  --ink-soft: #4a4542;
  --crimson: #be1e2d;
  --crimson-deep: #7e1620;
  --purple: #6e5a86;
  --cream: #f3eee6;

  --bg: var(--paper);
  --bg-2: var(--paper-2);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --border: rgba(30, 26, 25, 0.14);

  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 68ch;
  --gutter: 16px;
  --radius: 10px;

  /* One type scale for the whole page. Body copy is the default (set on <body>);
     everything else below is a deliberate exception, not a per-block one-off. */
  --text: 1rem;                               /* every sentence on the page: the 16px browser default */
  --text-lead: clamp(1.15rem, 2vw, 1.3rem);   /* the hero lead, under the name */
  --text-meta: 0.9rem;                        /* secondary meta, always --fg-soft */
  --text-label: 0.8rem;                       /* uppercase micro-labels */

  /* Crimson fills a button at any brightness, but as link text it has to lift off
     a charcoal background — hence a separate link token the dark theme overrides. */
  --link: var(--crimson);
  --link-hover: var(--crimson-deep);
  --band-bg: var(--ink);
  --band-fg: var(--cream);
  --band-accent: #e8a0a8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1a19;
    --bg-2: #2a2524;
    --fg: #f3eee6;
    --fg-soft: #cfc6ba;
    --border: rgba(243, 238, 230, 0.16);
    --link: #e0565f;
    --link-hover: #f2949b;
    --band-bg: #2a2524;
    --band-fg: #f3eee6;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1a19;
  --bg-2: #2a2524;
  --fg: #f3eee6;
  --fg-soft: #cfc6ba;
  --border: rgba(243, 238, 230, 0.16);
  --link: #e0565f;
  --link-hover: #f2949b;
  --band-bg: #2a2524;
  --band-fg: #f3eee6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p, li { max-width: var(--measure); }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 700; }

.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.site-header { padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.wordmark { font-family: var(--sans); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--crimson); text-decoration: none; font-size: 0.9rem; }
.nav { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--link); }
.lang-toggle { border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.85rem; text-decoration: none; color: var(--fg); }

/* Section header: kicker → heading → short crimson rule */
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.kicker { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--text-label); color: var(--link); margin: 0 0 0.6rem; }
.rule { width: 3rem; height: 3px; background: var(--link); border: 0; margin: 0.8rem 0 1.4rem; }
/* A lead is ordinary body copy everywhere but the hero, where it sits under the name. */
.lead { color: var(--fg); }
.hero .lead { font-size: var(--text-lead); }
.note { color: var(--fg-soft); font-size: var(--text-meta); }
.mt { margin-top: 1.2rem; }
.inline-form { display: inline; }

/* Hero — the business card: role, name, portrait */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero .actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); align-items: center; }
.hero-portrait { width: min(320px, 100%); height: auto; aspect-ratio: 3 / 4; object-fit: cover; margin-inline: auto; }
.tagline { font-family: var(--serif); font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.25; margin: 0 0 0.8rem; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; width: min(220px, 60%); margin-inline: 0; }
}

/* Buttons — restrained: one solid accent, never full-bleed */
.btn { display: inline-block; background: var(--crimson); color: #fff; font-weight: 600; padding: 0.7rem 1.15rem; border-radius: var(--radius); text-decoration: none; border: 0; cursor: pointer; font-family: var(--sans); justify-self: start; }
.btn:hover { background: var(--crimson-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); font-weight: 500; }
.btn.secondary:hover { background: var(--bg-2); color: var(--fg); }

/* Cards */
.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; }
.card h3 { margin-bottom: 0.3rem; }
.card .meta { color: var(--fg-soft); font-size: var(--text-meta); margin-bottom: 0.9rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.82rem; }
.card details { margin-top: 0.8rem; }
.card summary { cursor: pointer; font-weight: 600; color: var(--link); }
.card details ul { margin-top: 0.6rem; }

/* Dark band (charcoal callout, as in the deck) */
.band { background: var(--band-bg); color: var(--band-fg); border-block: 1px solid var(--border); }
.band .kicker { color: var(--band-accent); }
.band .rule { background: var(--band-accent); }
.band a { color: #f1b9bf; }

/* Two columns */
.cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }

/* Pricing table */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { text-align: left; padding: 0.8rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--sans); font-size: var(--text-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-soft); }
/* The number is the last column and stays the same size as the row — no shouting. */
td.price { white-space: nowrap; font-weight: 600; }

/* About */
.portrait { width: min(360px, 100%); border-radius: var(--radius); border: 1px solid var(--border); }

/* Forms */
form.stack { display: grid; gap: 0.9rem; max-width: 560px; }
label { font-weight: 600; display: grid; gap: 0.3rem; }
input, textarea, select { font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
.flash { padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); }
.flash.ok { border-color: #6a9a6a; }
.flash.error { border-color: var(--crimson); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--fg); }
.site-footer .links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.8rem; }

/* Admin */
.admin h2 { margin-top: 2rem; }
.admin .field { margin-bottom: 1rem; }
.admin .field .key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: var(--fg-soft); }
.admin textarea { min-height: 4.5rem; }
.admin .row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }

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

/* ---------- One-page layout additions ---------- */

/* Anchored sections stop below the header instead of under it */
section[id] { scroll-margin-top: 1rem; }
html { scroll-behavior: smooth; }

/* Hero contact row — email, LinkedIn, calendar, GitHub — directly under the name */
.contact-row { list-style: none; padding: 0; margin: 0.8rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-weight: 600; }
.contact-row a { color: var(--fg); text-decoration-color: var(--border); }
.contact-row a:hover { color: var(--link); }

@media (min-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Process band: the aside shares the band's colours */
.band-aside { padding-top: 0.3rem; }

/* Pricing table: a table on wide screens, labelled blocks on phones — no horizontal scroll */
table.pricing { min-width: 0; }
table.pricing td.row-title { font-weight: 600; }
@media (max-width: 640px) {
  table.pricing thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.pricing tr { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
  table.pricing td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: 0.15rem 0; }
  table.pricing td::before { content: attr(data-label); color: var(--fg-soft); font-size: var(--text-label); text-transform: uppercase; letter-spacing: 0.06em; }
  table.pricing td.row-title { display: block; }
  table.pricing td.row-title::before { display: none; }
}

/* Touch targets and tap comfort */
.nav a, .contact-row a { padding: 0.35rem 0; display: inline-block; }

/* Tap targets ≥ 44px without moving anything: pad the hit area, pull it back with margins */
.contact-row a, .site-footer .links a, .site-footer p a { display: inline-block; padding: 0.65rem 0.3rem; margin: -0.65rem -0.3rem; }
.lang-toggle { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; }

/* Channel block in the footer — the one piece of self-promotion, given room */
.channel-block { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; margin: 0 0 1.4rem; color: var(--fg); }
.channel-block h3 { margin-bottom: 0.4rem; }
.channel-block p { max-width: 60ch; }

/* Format groups */
.group-title { font-family: var(--sans); font-size: var(--text-label); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-soft); margin: 1.6rem 0 0.8rem; }
.cards-one { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cards-one { grid-template-columns: minmax(0, 1fr); } }

/* "What people come with": a deliberate list, crimson dash instead of browser bullets */
.problems ul { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.problems li { position: relative; padding-left: 1.6rem; margin-bottom: 0.9rem; }
.problems li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 0.9rem; height: 2px; background: var(--link); }

/* Language toggle: a pill with the label centred — wins over the generic .nav a rule */
.nav a.lang-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 48px; padding: 0 0.9rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; font-weight: 600; line-height: 1; }

.to-top { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; margin: -0.65rem -0.3rem; vertical-align: middle; }

/* ---------- Header: one row on desktop; on phones brand + toggle, then a nav row that scrolls sideways ---------- */
.site-header .wrap { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav toggle"; align-items: center; gap: 0.5rem 1.5rem; }
.site-header .wordmark { grid-area: brand; }
.site-header .nav { grid-area: nav; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-end; }
.site-header .nav::-webkit-scrollbar { display: none; }
.site-header .nav a { white-space: nowrap; }
.site-header .lang-toggle { grid-area: toggle; }
@media (max-width: 760px) {
  .site-header { padding: 0.5rem 0; }
  .site-header .wrap { grid-template-columns: 1fr auto; grid-template-areas: "brand toggle" "nav nav"; gap: 0 1rem; }
  .site-header .nav { justify-content: flex-start; gap: 1rem; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
}

/* ---------- Hero: identity + portrait share the first screen on phones ---------- */
.hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); grid-template-areas: "id photo" "body photo"; align-items: start; }
.hero-id { grid-area: id; }
.hero-body { grid-area: body; }
.hero-grid .hero-portrait { grid-area: photo; align-self: center; }
.hero-grid.no-photo { grid-template-columns: 1fr; grid-template-areas: "id" "body"; }
@media (max-width: 760px) {
  .hero { padding-top: 1.25rem; }
  .hero-grid { grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "photo id" "body body"; gap: 0.9rem 1rem; align-items: start; }
  .hero-grid .hero-portrait { order: 0; width: 96px; aspect-ratio: 1; object-fit: cover; object-position: 50% 15%; border-radius: 12px; margin: 0; align-self: start; }
  .hero-id h1 { font-size: 1.75rem; margin-bottom: 0.3rem; }
  .hero-id .kicker { font-size: 0.72rem; margin-bottom: 0.3rem; }
  .contact-row { font-size: 1rem; gap: 0.2rem 1rem; margin-top: 0.4rem; }
  .hero-body .rule { margin: 0.2rem 0 0.8rem; }
  .hero-body .lead { font-size: 1rem; }
}

/* Phones: CTA directly under the tagline so it sits inside the first screen; the lead follows */
@media (max-width: 760px) {
  .hero-body { display: flex; flex-direction: column; }
  .hero-body .rule { order: 1; }
  .hero-body .tagline { order: 2; margin-bottom: 0.6rem; }
  .hero-body .actions { order: 3; margin: 0.2rem 0 1rem; }
  .hero-body .lead { order: 4; }
}

/* Phones: the business card is centred — portrait above the name, contacts and the button under it */
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "photo" "id" "body"; gap: 0.9rem; justify-items: center; text-align: center; }
  .hero-grid .hero-portrait { width: 128px; aspect-ratio: 1; object-fit: cover; object-position: 50% 15%; border-radius: 50%; margin: 0; }
  .hero-id { width: 100%; }
  .hero-id h1 { font-size: 1.9rem; }
  .contact-row { justify-content: center; }
  .hero-body { width: 100%; align-items: center; }
  .hero-body .rule { margin-inline: auto; }
  .hero-body .tagline { text-align: center; }
  .hero-body .actions { flex-direction: column; align-items: center; gap: 0.5rem; }
  .hero-body .actions .note { text-align: center; }
  .hero-body .lead { text-align: left; }
}

/* Phones: the primary button is a button, not a banner — content width, centred */
@media (max-width: 760px) {
  .hero .hero-body .actions .btn { display: inline-block; width: auto; max-width: 100%; padding: 0.75rem 1.4rem; }
}

/* ================= One body text: same family, size and colour everywhere; only weight varies ================= */
.lead, .hero .lead, .note, .tagline ~ .note, .card p, .card .meta, .card-result, .card-involvement, .card li,
table.pricing td, .site-footer p, .site-footer .links a, .channel-block p, .contact-row, .contact-row a, .problems li,
.section li, .section p, .one-list li { font-family: var(--sans); font-size: var(--text); line-height: 1.6; color: var(--fg); font-weight: 400; }
.contact-row a, .nav a { font-weight: 400; }
.card-result strong, .card-involvement strong { font-weight: 700; }
table.pricing td.row-title { font-weight: 700; }
.tagline { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }

/* One button: identical shape and size; the secondary differs only in colour */
.btn, .btn.secondary, .hero .hero-body .actions .btn { display: inline-block; padding: 0.75rem 1.3rem; border-radius: var(--radius); font-size: var(--text); font-weight: 600; line-height: 1.3; width: auto; }
.btn.secondary { background: transparent; color: var(--fg); border: 1px solid var(--fg); }
.btn.secondary:hover { background: var(--bg-2); }

/* The process is one continuous list */
.one-list ul { margin-bottom: 0; }
.one-list ul + ul { margin-top: 0; }
.one-list li:last-child { margin-bottom: 0.4em; }

/* Phones: fewer competing lines in the header and the hero */
@media (max-width: 760px) {
  .hero-id .kicker { font-size: var(--text-label); }
  .contact-row { font-size: var(--text); gap: 0.1rem 0.9rem; }
  .site-header .nav { gap: 0.9rem; }
}
/* Every button carries a 1px border so solid and outlined ones are exactly the same height */
.btn { border: 1px solid transparent; }
.btn.secondary { border-color: var(--fg); }
