/* ==========================================================================
   ForLater public site — shared stylesheet.
   --------------------------------------------------------------------------
   The token block is the light half of the admin console's admin.css, which
   is itself a 1:1 transcription of the mobile app's Material 3 scheme at
   composeApp/.../theme/Color.kt. Role names match in all three places.
   The public site is light-only by design: no dark block here.
   ========================================================================== */

:root {
  --primary: #c07000;
  --on-primary: #ffffff;
  --primary-container: #ffddb5;
  --on-primary-container: #2a1700;

  --secondary: #4d6356;
  --on-secondary: #ffffff;
  --secondary-container: #cfe9d8;
  --on-secondary-container: #0a1f15;

  --tertiary: #4a5d8c;
  --on-tertiary: #ffffff;
  --tertiary-container: #dbe1ff;
  --on-tertiary-container: #041946;

  --background: #fffbf7;
  --on-background: #1f1b16;
  --surface: #fffbf7;
  --on-surface: #1f1b16;
  --surface-variant: #f2e5d7;
  --on-surface-variant: #4f4539;
  --outline: #817567;
  --outline-variant: #d5c9bb;

  --surface-container-lowest: #ffffff;
  --surface-container-low: #fcf5ec;
  --surface-container: #f6efe6;
  --surface-container-high: #f0e9e0;
  --surface-container-highest: #ebe4db;

  --content-max: 42rem;
  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;

  --shadow-1: 0 1px 2px rgb(63 46 24 / 0.06), 0 1px 3px rgb(63 46 24 / 0.04);
  --shadow-2: 0 2px 4px rgb(63 46 24 / 0.05), 0 8px 24px rgb(63 46 24 / 0.08);
  --grain-opacity: 0.05;

  color-scheme: light;
}

@font-face {
  font-family: "Work Sans";
  src: url("../fonts/WorkSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("../fonts/WorkSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("../fonts/WorkSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Base --- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--on-background);
  font-family: "Work Sans", ui-sans-serif, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11";
}

/* Paper grain, as on the admin console. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--primary);
  text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* --- Site chrome. Kept inside <nav>/<footer> so the backend scraper
       excludes it from the article text it summarizes. --- */

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  text-decoration: none;
}

.site-header__brand img {
  width: 2rem;
  height: 2rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}

/* --- Content --- */

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 1rem;
}

.hero__icon {
  width: 6rem;
  height: 6rem;
}

.hero p {
  color: var(--on-surface-variant);
  font-size: 1.125rem;
}

/* Circular badge around a share glyph, mirroring the app's tutorial screen. */
.share-glyph {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.share-glyph svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.share-row figcaption {
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.callout p:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
}

.btn:hover {
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
