/*
  Base styles for Coastal Sourdough Co. one-page demo
  - Reset, variables, typography, links, utilities, reveal
*/

/* 1) Minimal modern reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4 { overflow-wrap: anywhere; }
html:focus-within { scroll-behavior: smooth; }

/* 2) Design tokens */
:root {
  /* Palette */
  --color-canvas: #F6F3ED; /* Off-White Sand */
  --color-ink: #1C1C1A;    /* Charcoal */
  --color-accent: #6FA69B; /* Sea Glass */
  --color-gold: #C7A86F;   /* Warm Gold */
  --color-neutral: #E7E0D6;/* Oat */

  /* Typography */
  --font-display: "Bodoni Moda", ui-serif, Georgia, serif;
  --font-sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  /* Fluid type scale */
  --fs-xxl: clamp(3rem, 8vw, 7rem);
  --fs-xl: clamp(2rem, 4vw, 3.25rem);
  --fs-lg: clamp(1.25rem, 1.5vw, 1.6rem);
  --fs-base: clamp(1rem, 0.5vw, 1.125rem);
  --fs-sm: clamp(0.9rem, 0.3vw, 1rem);

  /* Spacing */
  --space-xs: .5rem;
  --space-sm: .75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Effects */
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.10);
  --grain-opacity: .08;
}

/* 3) Base */
body {
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, .display {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-xxl); line-height: 1.05; }
h2 { font-size: var(--fs-xl); line-height: 1.1; }
h3 { font-size: var(--fs-lg); line-height: 1.2; }

p { margin-block: var(--space-md); color: rgba(28,28,26,.92); }

a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-size: 0% 1px; background-position: 0 100%; transition: background-size 260ms ease; }
a:hover, a:focus-visible { background-size: 100% 1px; }

.container { width: min(1200px, 92%); margin-inline: auto; }
.text-center { text-align: center; }
.muted { color: rgba(28,28,26,.7); }

/* Buttons */
.btn { display: inline-block; border: 1px solid rgba(28,28,26,.2); padding: .7rem 1rem; border-radius: 999px; background: transparent; cursor: pointer; transition: transform .18s ease, background-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-canvas); }
.btn-ghost { border-color: rgba(28,28,26,.25); background: rgba(255,255,255,.5); backdrop-filter: blur(6px); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


