/* Field Weather — weather.vietts.app. Colours mirror the app's Light (default)
   and Forest (dark) palettes. No JavaScript, no third-party requests. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/Newsreader-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f3f4ee;
  --surface: #fffefa;
  --surface-2: #e7ece5;
  --ink: #20372f;
  --muted: #5f7168;
  --line: rgba(44, 79, 65, 0.16);
  --accent: #7a6013;
  --accent-soft: #f4ecd1;
  --forest: #1e4638;
  --gold: #e0ae3e;
  --on-scene: #ffffff;
  /* ≥ 3:1 against paper and surface (WCAG 1.4.11). */
  --focus: #1e4638;
  --radius: 20px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b211a;
    --surface: #17362d;
    --surface-2: #1e4036;
    --ink: #f4f2e8;
    --muted: #b7c4bc;
    --line: rgba(239, 214, 139, 0.2);
    --accent: #f2d27e;
    --accent-soft: #2a412f;
    --forest: #0d2a21;
    --focus: #e0ae3e;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px 16px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 2px;
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
}

.lang {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px !important;
}

/* Hero */

.hero {
  position: relative;
  color: var(--on-scene);
  background: #234 url("/assets/img/hero-day.webp") center 60% / cover no-repeat;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .hero {
    background-image: url("/assets/img/hero-night.webp");
  }
}

/* Readability gradient from the app's background README. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 24, 28, 0.5),
    rgba(5, 24, 28, 0.45) 45%,
    rgba(5, 24, 28, 0.65)
  );
}

.hero .wrap {
  position: relative;
  padding-top: clamp(48px, 9vw, 112px);
  padding-bottom: clamp(48px, 9vw, 112px);
}

.hero .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font: 500 clamp(2.6rem, 8vw, 4.5rem) / 1.05 "Newsreader", Georgia, serif;
  letter-spacing: -0.02em;
  margin: 20px 0 12px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 34em;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero .soon {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

/* Sections */

main {
  flex: 1;
}

main section {
  padding: 48px 0;
}

main h2 {
  font: 600 clamp(1.6rem, 4vw, 2.2rem) / 1.2 "Newsreader", Georgia, serif;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card img {
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  vertical-align: middle;
}

.sources {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.sources li {
  margin: 4px 0;
}

.note {
  border-left: 4px solid var(--gold);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
}

/* Legal and support pages */

.prose {
  max-width: 72ch;
  padding: 40px 0 56px;
  overflow-wrap: anywhere;
}

.prose h1 {
  font: 600 clamp(2rem, 6vw, 2.8rem) / 1.15 "Newsreader", Georgia, serif;
  margin: 0 0 8px;
}

.prose .meta {
  color: var(--muted);
  margin: 0 0 28px;
}

.prose h2 {
  font: 700 1.2rem/1.35 "Inter", system-ui, sans-serif;
  margin: 32px 0 8px;
}

.prose h3 {
  font-size: 1.02rem;
  margin: 20px 0 6px;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin: 4px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 8px 0;
}

.prose details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 16px;
  margin: 10px 0;
}

.prose summary {
  cursor: pointer;
  font-weight: 700;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 24px;
  padding-bottom: 32px;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--ink);
}

.site-footer .copy {
  margin-left: auto;
}

@media (max-width: 480px) {
  .site-footer .copy {
    margin-left: 0;
    width: 100%;
  }
}
