/* ═══════════════════════════════════════════════════════════════════
   PERPETUAL PAVILION — "Clay" Design System
   Minimalist · Light Pastel · Claymorphism · Built from scratch
   No Bootstrap. No template. Pure, modern CSS.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap');

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  /* Surfaces (soft sage pastel) */
  --bg:         #E6ECE7;
  --bg-soft:    #EDF2EE;
  --surface:    #F1F6F2;
  --surface-hi: #FBFCFB;

  /* Ink */
  --ink:        #233029;
  --ink-soft:   #5C6A61;
  --ink-mute:   #95A29A;

  /* Accent — soft pastel green (dark ink on fills for legibility) */
  --accent:       #88CBA6;
  --accent-deep:  #3F9D71;
  --accent-soft:  #D2ECDD;
  --accent-ink:   #173D2A;

  /* Optional cool tint for variety */
  --cool:       #6FAAC9;
  --cool-soft:  #D6E7EF;

  /* Shadow palette — the claymorphism signature */
  --sh-dark:  rgba(150, 172, 158, 0.55);
  --sh-light: rgba(255, 255, 255, 0.92);

  --clay:     16px 16px 34px var(--sh-dark), -12px -12px 28px var(--sh-light);
  --clay-sm:  9px 9px 20px var(--sh-dark), -7px -7px 16px var(--sh-light);
  --clay-xs:  5px 5px 12px var(--sh-dark), -4px -4px 10px var(--sh-light);
  --clay-in:  inset 6px 6px 14px var(--sh-dark), inset -6px -6px 14px var(--sh-light);
  --clay-in-deep: inset 8px 8px 18px var(--sh-dark), inset -8px -8px 18px var(--sh-light);
  --clay-accent: 12px 12px 26px rgba(63, 157, 113, 0.32), -8px -8px 20px var(--sh-light);

  /* Radii */
  --r-xs:   14px;
  --r-sm:   20px;
  --r:      28px;
  --r-lg:   36px;
  --r-pill: 999px;

  /* Rhythm */
  --container: 1200px;
  --gap:       24px;
  --section-y: clamp(64px, 9vw, 130px);

  --t: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Display font for headings + logo */
  --font-display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --ease-reveal: cubic-bezier(0.16, 0.8, 0.3, 1);
}

/* ── Reset / base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

/* ── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1, h2, h3, .nav__logo { font-family: var(--font-display); }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h4 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
p  { color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.muted { color: var(--ink-mute); }
.accent-text { color: var(--accent-deep); }

/* ── Layout helpers ────────────────────────────────────────────── */
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.center { text-align: center; }
.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; gap: var(--gap); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* Section heading block */
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 14px;
}

/* ── Buttons (clay) ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--clay-sm);
  transition: transform var(--t), box-shadow var(--t), background var(--t);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--clay); }
.btn:active { transform: translateY(0); box-shadow: var(--clay-in); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--clay-accent);
}
.btn--primary:hover { background: var(--accent-deep); }

.btn--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
}
.btn--ghost:hover { background: var(--surface); box-shadow: var(--clay-xs); transform: translateY(-2px); }

.btn--sm { padding: 10px 20px; font-size: 0.82rem; }
.btn--lg { padding: 18px 38px; font-size: 1.05rem; }
.btn--icon { width: 52px; height: 52px; padding: 0; border-radius: 50%; }

/* ── Cards (clay) ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--clay);
  padding: 28px;
  transition: transform var(--t), box-shadow var(--t);
}
.card--hover:hover { transform: translateY(-6px); }
.card--flat { box-shadow: var(--clay-sm); }
.card--inset { box-shadow: var(--clay-in); background: var(--bg-soft); }
.card__media {
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 16 / 10;
}
.card__media img, .card__media video { width: 100%; height: 100%; object-fit: cover; }
.card__title { color: var(--ink); margin-bottom: 8px; }

/* ── Inputs (clay, pressed-in) ─────────────────────────────────── */
.input, input[type=text], input[type=email], input[type=tel],
input[type=password], textarea, select {
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  box-shadow: var(--clay-in);
  border: none;
  color: var(--ink);
  outline: none;
  transition: box-shadow var(--t);
}
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--ink-mute); }
.input:focus, input:focus, textarea:focus, select:focus {
  box-shadow: var(--clay-in-deep), 0 0 0 3px var(--accent-soft);
}

/* ── Badges / pills / tags ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface);
  box-shadow: var(--clay-xs);
  color: var(--ink-soft);
}
.badge--accent { background: var(--accent); color: #fff; box-shadow: none; }
.badge--soft   { background: var(--accent-soft); color: var(--accent-deep); box-shadow: none; }
.badge--cool   { background: var(--cool-soft); color: var(--cool); box-shadow: none; }

/* ── Navbar ────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: min(100% - 32px, var(--container));
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px 12px 26px;
  background: rgba(243, 241, 251, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  border-radius: var(--r-pill);
  box-shadow: var(--clay-sm);
}
.nav__logo { font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.02em; }
.nav__logo span { color: var(--accent-deep); }
.nav__menu { display: flex; gap: 30px; }
.nav__menu a { font-weight: 600; color: var(--ink-soft); transition: color var(--t); font-size: 0.95rem; }
.nav__menu a:hover { color: var(--accent-deep); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-soft);
  margin-top: var(--section-y);
  padding: 64px 0 32px;
}
.footer a { color: var(--ink-soft); transition: color var(--t); }
.footer a:hover { color: var(--accent-deep); }
.footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(174,168,204,0.25);
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.88rem;
}

/* ── Utilities ─────────────────────────────────────────────────── */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:40px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:40px}
.hidden { display: none !important; }
.clay-blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.5; z-index: -1; pointer-events: none;
}

/* ── Scroll reveal animations ──────────────────────────────────── */
/* Guarded by html.anim so content is always visible if JS is off */
.anim .hero .container,
.anim main section > .container,
.anim .footer .container {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal);
  will-change: opacity, transform;
}
.anim .hero .container.in,
.anim main section > .container.in,
.anim .footer .container.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .anim .hero .container,
  .anim main section > .container,
  .anim .footer .container { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet / mobile nav → burger + dropdown menu */
@media (max-width: 820px) {
  :root { --section-y: clamp(52px, 11vw, 96px); }
  .nav { flex-wrap: wrap; border-radius: var(--r); padding: 12px 14px 12px 20px; row-gap: 4px; }
  .nav__menu { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__menu.open {
    display: flex;
    flex-direction: column;
    order: 3;
    width: 100%;
    gap: 2px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(150, 172, 158, 0.3);
  }
  .nav__menu.open a { padding: 11px 6px; font-size: 1rem; }
}

@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .container { width: min(100% - 28px, var(--container)); }
  .footer { padding: 48px 0 28px; }
  .footer .grid { gap: 30px; }
  .nav__actions { gap: 8px; }
  /* keep primary action + burger; hide secondary text button if cramped */
  .nav__actions .btn--sm { padding: 9px 16px; font-size: .8rem; }
}

@media (max-width: 420px) {
  .nav__logo { font-size: 1.1rem; }
  .btn--lg { padding: 14px 24px; font-size: .96rem; }
  .hero__cta, .hero__social { gap: 10px !important; }
}
