/* Hallmark · shape: app screen · genre: editorial · theme: brand
 * paper: #FDFBF9 ivory · accent: #B89562 muted gold (text #7A5E32) · display: Satoshi Bold · body: Satoshi, system Arabic fallback
 * nav: top bar, wordmark and language switch · signature: the timeline image itself, drawn live beside the form · states: default, empty fields, row limit, saving, saved, share unsupported, save error
 * axes: light/geometric-sans/warm · posture: editor left, live preview right · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V3 · weakest: V, an editor beside a preview is the familiar tool shape; kept because brides trust it, and made the preview the real 1080x1920 file they send */
@import url("./tokens.css?v=2");
@import url("./base.css?v=1");

@font-face { font-family: "Satoshi"; src: url("./fonts/Satoshi-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("./fonts/Satoshi-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("./fonts/Satoshi-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --control-h: 44px;
  --gutter: 40px;
  --container: 1200px;
}
@media (max-width: 60rem) { :root { --gutter: 24px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; } }

body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }

.skip { position: absolute; inset-inline-start: var(--space-md); top: -60px; background: var(--color-ink); color: var(--color-on-ink); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-control); z-index: var(--z-toast); }
.skip:focus-visible { top: var(--space-md); }

/* top bar */
.bar { border-bottom: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
/* The approved horizontal lockup (assets/brand/logo-gold.png), never retyped.
   Brand guide: 120px minimum on screen and clear space around it. */
.brand { display: inline-flex; align-items: center; padding-block: var(--space-sm); text-decoration: none; }
.brand img { width: 200px; height: auto; }
@media (max-width: 40rem) { .brand img { width: 160px; } }
.lang { min-height: var(--control-h); padding-inline: var(--space-md); border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); cursor: pointer; font-weight: 500; }
.lang:hover { background: var(--color-paper-2); }
.lang:active { background: var(--color-paper-3); }

/* intro */
.intro { padding-block: var(--space-xl) var(--space-lg); }
.intro h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); max-width: 22ch; }
.intro .lead { margin-top: var(--space-sm); color: var(--color-muted); font-size: var(--text-lg); }
.notice { padding: var(--space-md); border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-card); background: var(--color-paper-2); margin-bottom: var(--space-lg); }

/* workspace */
.workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-xl); align-items: start; }
@media (max-width: 60rem) { .workspace { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); } }

.editor { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.group { margin: 0; padding: var(--space-lg); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper-2); min-width: 0; }
.group legend { padding: 0; font-weight: 700; font-size: var(--text-lg); float: inline-start; width: 100%; margin-bottom: var(--space-md); }
.group legend + * { clear: both; }
.hint { color: var(--color-muted); font-size: var(--text-sm); }
.group .hint { margin-bottom: var(--space-md); }

.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-md); }
.row-2 + .row-2 { margin-top: var(--space-md); }
@media (max-width: 40rem) { .row-2 { grid-template-columns: minmax(0, 1fr); } }

.field { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
.field > span { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.field input {
  width: 100%; min-height: var(--control-h); padding: 0 var(--space-sm);
  border: var(--rule-hair) solid var(--color-field-edge); border-radius: var(--radius-control);
  background: var(--color-paper); color: var(--color-ink);
  transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
.field input::placeholder { color: var(--color-muted); opacity: 1; }
.field input:hover { border-color: var(--color-ink-2); }
.field input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }
.field input:disabled { background: var(--color-paper-3); color: var(--color-ink-2); cursor: not-allowed; }
.field input[aria-invalid="true"] { border-color: var(--color-error); }

/* moments */
.moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-md); }
/* Each time is two lines: time, what and remove; then where, under what. */
.moment {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: var(--space-xs);
  grid-template-areas: "time label remove" ". place place"; align-items: center;
  padding-bottom: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule);
}
.moment:last-child { padding-bottom: 0; border-bottom: 0; }
.moment .field-time { grid-area: time; }
.moment .field-label { grid-area: label; }
.moment .field-place { grid-area: place; }
.moment .m-remove { grid-area: remove; }
.field-time input { font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) {
  .moment { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time remove" "label label" "place place"; }
  .moment .field-time { max-width: 11rem; }
}
.moment-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-md); }
#limit-note { margin: var(--space-sm) 0 0; }

/* buttons, all states */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--control-h); padding: 0 var(--space-lg); border-radius: var(--radius-pill);
  border: var(--rule-hair) solid transparent; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { cursor: not-allowed; opacity: 0.6; transform: none; }
.btn-primary { background: var(--color-ink); color: var(--color-on-ink); }
.btn-primary:hover:not(:disabled) { background: var(--color-ink-2); }
.btn-secondary { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn-secondary:hover:not(:disabled) { background: var(--color-paper-2); }
.btn-quiet { background: var(--color-paper); color: var(--color-ink); border-color: var(--color-rule-strong); padding-inline: var(--space-md); font-weight: 500; }
.btn-quiet:hover:not(:disabled) { border-color: var(--color-muted); }
.btn-remove { min-height: var(--control-h); padding-inline: var(--space-sm); background: transparent; color: var(--color-muted); font-weight: 500; border-radius: var(--radius-control); }
.btn-remove:hover:not(:disabled) { color: var(--color-error); background: var(--color-paper); }

/* looks */
.looks { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.look { position: relative; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--control-h); padding: 0 var(--space-md) 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-pill); background: var(--color-paper); cursor: pointer; }
.look input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.look:hover { border-color: var(--color-muted); }
.look:has(input:checked) { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); }
.look:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.swatch { width: 22px; height: 22px; border-radius: var(--radius-pill); border: var(--rule-hair) solid var(--color-rule-strong); }
.swatch-roses { background: radial-gradient(circle at 35% 35%, var(--color-rose) 0 45%, var(--color-leaf) 46% 60%, var(--color-paper-2) 61%); }
.swatch-ivory { background: var(--color-paper); }
.swatch-linen { background: var(--color-paper-2); box-shadow: inset 0 0 0 3px var(--color-accent); }
.swatch-espresso { background: var(--color-ink); }

.check { display: inline-flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-md); min-height: var(--control-h); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--color-ink); margin: 0; }

/* preview */
.preview { position: sticky; top: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
@media (max-width: 60rem) { .preview { position: static; } }
.preview-title { font-size: var(--text-lg); }
.frame { border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper-3); padding: var(--space-md); }
#tl-canvas { display: block; width: 100%; max-width: 380px; height: auto; aspect-ratio: 9 / 16; margin-inline: auto; border-radius: 6px; background: var(--color-paper); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.actions .btn { flex: 1 1 12rem; }
.status { min-height: 1.5em; font-size: var(--text-sm); color: var(--color-ink-2); }
.status.is-error { color: var(--color-error); }

/* next step + faq */
.next, .faq { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.next h2, .faq h2 { font-size: var(--text-xl); }
.next p { margin-top: var(--space-xs); color: var(--color-muted); }
.links { list-style: none; padding: 0; margin: var(--space-lg) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.links a { display: inline-flex; align-items: center; min-height: var(--control-h); padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-pill); text-decoration: none; color: var(--color-ink); font-weight: 500; background: var(--color-paper); transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.links a:hover { border-color: var(--color-ink); background: var(--color-paper-2); }
.links a:active { background: var(--color-paper-3); }

.faq dl { margin: var(--space-lg) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
@media (max-width: 60rem) { .faq dl { grid-template-columns: minmax(0, 1fr); } }
.faq dt { font-weight: 700; }
.faq dd { margin: var(--space-2xs) 0 0; color: var(--color-muted); }

.foot { margin-top: var(--space-2xl); border-top: var(--rule-hair) solid var(--color-rule); }
.foot-inner { display: flex; flex-wrap: wrap; gap: var(--space-lg); min-height: 72px; align-items: center; }
.foot a { color: var(--color-muted); }
.foot a:hover { color: var(--color-ink); }
