/* ==========================================================================
   base.css — reset, typography defaults, shared primitives (buttons, chips,
   pills, section headings) and the kolam texture used across the site.
   ========================================================================== */

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

html { color-scheme: light; scroll-behavior: smooth; }
[data-theme="night"] { color-scheme: dark; }

/* Scroll everywhere, show a bar nowhere. */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.02em;
  color: var(--ink);
}
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
input { font-family: inherit; }

::selection { background: var(--marigold); color: #241703; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Kolam — the dot grid drawn at Tamil doorsteps. Our recurring texture:
   on night surfaces it's the star-field of the hero, on paper it's a
   whisper behind section headings.
   -------------------------------------------------------------------------- */
.kolam {
  background-image: radial-gradient(circle, rgba(255,255,255,.17) 1.7px, transparent 1.8px);
  background-size: 26px 26px;
  background-position: 0 0;
}
.kolam-ink {
  background-image: radial-gradient(circle, rgba(26,32,54,.10) 1.6px, transparent 1.7px);
  background-size: 24px 24px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: var(--r-pill); padding: 11px 20px; min-height: 44px;
  font-size: var(--t-sm); font-weight: 600; font-family: var(--display);
  transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--ink-faint); }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--marigold); border-color: var(--marigold); color: #2B1B02;
}
.btn-primary:hover { background: #FFB53C; border-color: #FFB53C; }

.btn-night {
  background: var(--night); border-color: var(--night); color: var(--night-ink);
}
.btn-night:hover { background: var(--night-2); border-color: var(--night-2); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--page-2); color: var(--ink); border-color: transparent; }

.btn-sm { min-height: 38px; padding: 8px 15px; font-size: var(--t-xs); }
.btn-icon { padding: 0; width: 44px; min-height: 44px; }
.btn-icon.btn-sm { width: 38px; }

/* --------------------------------------------------------------------------
   Chips & pills
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft);
  border-radius: var(--r-pill); padding: 8px 16px; font-size: var(--t-sm); font-weight: 500;
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--page); font-weight: 600;
}

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-xs); font-weight: 600; padding: 3px 10px;
  border-radius: var(--r-pill); background: var(--page-2); color: var(--ink-soft);
}
.tag-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--marigold);
}
.section-head { margin-bottom: var(--s6); max-width: 62ch; }
.section-head h2 { font-size: var(--t-2xl); margin-top: var(--s3); }
.section-head p { color: var(--ink-soft); margin-top: var(--s3); font-size: var(--t-md); }

/* --------------------------------------------------------------------------
   Entrance motion — one keyframe, reused.
   -------------------------------------------------------------------------- */
.rise { opacity: 0; transform: translateY(10px); animation: rise .45s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.pop { animation: pop .4s var(--pop); }
@keyframes pop {
  0%   { transform: scale(1.5) rotate(-12deg); opacity: 0; }
  60%  { transform: scale(.93) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
