/* domo.pet — base styles. Only token references live here; raw colors
   are forbidden outside tokens.css (enforced by review). */

* { box-sizing: border-box; }

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

img, video { max-width: 100%; height: auto; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding-block: var(--section-gap); }

/* ─── Header / nav ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.15rem; }
.logo svg { color: var(--brand-primary); }
.site-nav { display: flex; gap: 1.25rem; align-items: center; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.nav-cta {
  color: var(--background);
  background: var(--gradient-hero);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* ─── Hero (home) ──────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero .container {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: 78vh;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  line-height: 1.35;
  margin: 0 0 1rem;
  font-weight: 900;
}
.hero h1 .grad {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 34rem; }
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--gradient-hero); color: var(--background); }
.btn-accent { background: var(--accent); color: var(--background); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }

/* ─── Cards / feature grid ─────────────────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.card:hover { border-color: var(--brand-primary); transform: translateY(-3px); }
.card .icon { color: var(--brand-primary); font-size: 1.6rem; }
.card h3 { margin: 0.75rem 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ─── Section headings ─────────────────────────────────────────────────── */
.kicker {
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}
h2.section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 0.75rem; }
p.section-lead { color: var(--muted); max-width: 44rem; margin: 0 auto 2.5rem; text-align: center; }
.center { text-align: center; }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ─── Hex motif ────────────────────────────────────────────────────────── */
.hex-canvas { position: relative; min-height: 20rem; }
.hex-bg { position: absolute; inset: 0; opacity: 0.35; pointer-events: none; }

/* Scroll reveal (JS adds .revealed; without JS content stays visible) */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.js .reveal.revealed { opacity: 1; transform: none; }

/* ─── Forms ────────────────────────────────────────────────────────────── */
input, textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--brand-primary); border-color: transparent; }
label { display: block; margin-block: 0.75rem 0.3rem; font-weight: 600; font-size: 0.92rem; }
.error { color: var(--danger); font-size: 0.85rem; }
.success-panel {
  background: var(--surface);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

/* ─── Mobile (≤ 48rem) ─────────────────────────────────────────────────── */
@media (max-width: 48rem) {
  /* Header: logo row, then nav wraps onto its own lines (no JS hamburger —
     the page must stay fully usable without JS). */
  .site-header .container {
    flex-wrap: wrap;
    row-gap: 0.3rem;
    min-height: 0;
    padding-block: 0.6rem;
  }
  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem 1rem;
    width: 100%;
    font-size: 0.95rem;
  }
  .site-nav a.nav-cta { padding: 0.35rem 0.85rem; }

  .container { padding-inline: 1rem; }

  /* Hero: drop the desktop 78vh stage on small screens. */
  .hero .container { min-height: 0; padding-block: 2.5rem 1.5rem; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .hex-canvas { min-height: 15rem; }

  /* Footer stacks in DOM order. */
  .site-footer .container {
    flex-direction: column;
    gap: 0.9rem;
  }

  .success-panel { padding: 1.25rem; }
  .section { padding-block: calc(var(--section-gap) * 0.66); }
}
