/* TYDLY public website (issue #29). Colours from app/lib/core/design/tokens.dart,
   rules from docs/product/design-direction.md. No external resources. */
@font-face {
  font-family: "Outfit";
  src: url("/assets/site/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --deep: #0B3C49; --sand: #F2E8D5; --shallow: #7FC8C9; --signal: #F29F05;
  --bg: #F8F7F4; --card: #FFFFFF; --border: #E2E6E7; --fg: #10262D; --muted: #45595F;
  --primary: #16717D; --on-primary: #FFFFFF; --alt: #F1F1EE; --ph: #FFF4D6; --ph-border: #8F5400;
  --hero-bg: #0B3C49; --hero-fg: #F2E8D5; --hero-muted: #A9D8DA;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Outfit", var(--font);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07232B; --card: #0D323D; --border: #184A58; --fg: #F2E8D5; --muted: #7FC8C9;
    --primary: #7FC8C9; --on-primary: #07232B; --alt: #041A20; --ph: #3A3A2E; --ph-border: #FFC266;
    --hero-bg: #0D323D; --hero-fg: #F2E8D5; --hero-muted: #7FC8C9;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.6 var(--font);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-size: .92em; background: var(--alt); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--card); color: var(--fg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Header */
.top { background: var(--bg); border-bottom: 1px solid var(--border); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 10px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none;
         font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: .12em; min-height: 48px; }
.brand img { border-radius: 9px; }
.lang { margin-left: auto; display: flex; gap: 4px; }
.lang a, .main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
                       color: var(--fg); text-decoration: none; font-weight: 600; }
.lang a { font-size: .9rem; letter-spacing: .05em; min-width: 44px; justify-content: center; }
.lang a[aria-current], .main-nav a[aria-current] { background: var(--alt); color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.lang a:hover, .main-nav a:hover { background: var(--alt); }
.main-nav { order: 3; flex-basis: 100%; display: flex; gap: 4px; margin: 0 -12px; overflow-x: auto; }
@media (min-width: 720px) {
  .main-nav { order: 2; flex-basis: auto; margin: 0 0 0 auto; }
  .lang { order: 3; margin-left: 8px; }
}

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); padding: 40px 0 48px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.kicker { color: var(--hero-muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; margin-bottom: .6em; }
.lead { font-size: 1.15rem; }
.hero .lead { color: var(--hero-fg); max-width: 34em; }
.tide { width: 100%; max-width: 360px; margin: 8px 0 24px; }
.tide-fill { fill: #7FC8C9; opacity: .18; }
.tide-line { fill: none; stroke: #7FC8C9; stroke-width: 4; stroke-linecap: round; }
.tide-now { stroke: #F29F05; stroke-width: 2; stroke-dasharray: 4 5; }
.tide-dot { fill: #F29F05; stroke: #0B3C49; stroke-width: 3; }
.hero a { color: var(--sand); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
          border-radius: 14px; background: var(--primary); color: var(--on-primary); font-weight: 700; text-decoration: none; }
.hero .button { background: var(--sand); color: var(--deep); }
.button:hover { filter: brightness(1.06); }
.hero-shot { margin: 0; justify-self: center; }
.shot img { border-radius: 26px; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0, 0, 0, .18); background: var(--card); }
.hero .shot img { width: 240px; border-color: rgba(127, 200, 201, .35); }
@media (min-width: 820px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
  .hero .shot img { width: 280px; }
}

/* Blocks */
.block { padding: 48px 0; }
.block.alt { background: var(--alt); }
.cards { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; }
.card h3 { color: var(--primary); }
.card p { margin: 0; }

.shots { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; align-items: start; }
.shots figure { margin: 0; }
.shots .shot img { width: 100%; max-width: 240px; }
.shots .wide { grid-column: 1 / -1; }
.shots .wide img { border-radius: 18px; width: 100%; max-width: 560px; }
figcaption { margin-top: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; }
@media (min-width: 900px) {
  .shots { grid-template-columns: 1fr 1fr 2fr; }
  .shots .wide { grid-column: auto; align-self: center; }
}

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin: 0 0 .6em; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px;
                    border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary); transform: rotate(-45deg); }

.soon { background: var(--hero-bg); color: var(--hero-fg); padding: 40px 0; }
.stores { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stores li { border: 2px solid var(--hero-muted); border-radius: 14px; min-height: 52px; padding: 12px 20px; font-weight: 700; }

/* Text pages */
.page { padding-top: 32px; padding-bottom: 48px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; margin: 0 0 16px; }
.feature h2 { font-size: 1.35rem; color: var(--primary); }
.status { color: var(--muted); font-style: italic; }
.mail { font-size: 1.4rem; font-weight: 700; }
.mail a { display: inline-flex; align-items: center; min-height: 48px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.draft { background: var(--ph); border: 2px solid var(--ph-border); border-radius: 12px; padding: 14px 16px; }
.ph { background: var(--ph); outline: 1px dashed var(--ph-border); border-radius: 3px; padding: 0 3px; }

/* Footer */
.foot { border-top: 1px solid var(--border); padding: 20px 0 28px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
