/* ============================================================================
   AUUDIT — Creative Studio
   Anacuna typographic monosystem: black ink on paper white, one grotesque
   weight at three sizes, a single blush-pink brand seal, 27px pills, hairlines.
   ========================================================================== */

:root {
  /* Colors */
  --color-ink-black: #000000;
  --color-paper-white: #ffffff;
  --color-blush-bloom: #ffc8c8;

  /* Section accents — each section lights up its own color (Anacuna-style).
     The active nav pill + the section's eyebrow fill with these. */
  --accent-work: #ffc8c8;      /* blush    */
  --accent-about: #a6e6bf;     /* mint     */
  --accent-pricing: #f6df5e;   /* butter   */
  --accent-contact: #b9d3ff;   /* sky      */
  --accent-portfolio: #d9c7ff; /* lavender */

  /* Typography — Font Family (licensed face first, free grotesque fallback) */
  --font-grotesk: 'ABCMonumentGrotesk-Regular', 'Space Grotesk',
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;

  /* Typography — Scale */
  --text-body: 15px;
  --leading-body: 1.11;
  --text-heading-sm: 31px;
  --leading-heading-sm: 1.11;
  --text-display: 94px;
  --leading-display: 1;
  --font-weight-regular: 400;

  /* Display scales down on small screens but still bleeds */
  --text-display-fluid: clamp(40px, 11vw, 94px);
  --text-heading-fluid: clamp(22px, 4.5vw, 31px);

  /* Spacing */
  --spacing-4: 4px;
  --spacing-6: 6px;
  --spacing-7: 7px;
  --spacing-8: 8px;
  --spacing-10: 10px;
  --spacing-12: 12px;
  --spacing-14: 14px;
  --spacing-21: 21px;

  /* Layout */
  --page-pad: clamp(16px, 3vw, 28px);
  --section-gap: 80px;
  --element-gap: 7px;

  /* Border Radius — the one pill radius */
  --radius-pill: 27px;

  /* Surfaces */
  --surface-paper: #ffffff;
  --surface-blush-mark: #ffc8c8;
}

/* ----------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-grotesk);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-ink-black);
  background: var(--color-paper-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* titles bleed past the right edge on purpose */
}

a {
  color: inherit;
  text-decoration: none;
}

/* ----------------------------------------------------------------------------
   Pill primitive — every clickable thing is a 27px pill
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-6);
  padding: var(--spacing-7) var(--spacing-14);
  font-size: var(--text-body);
  line-height: 1;
  border: 1px solid var(--color-ink-black);
  border-radius: var(--radius-pill);
  background: var(--color-paper-white);
  color: var(--color-ink-black);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

/* .pill sets display:inline-flex, which would defeat the UA [hidden] rule —
   restore hiding so JS can toggle the mode-specific detail pills. */
.pill[hidden] {
  display: none;
}

.pill--seal {
  background: var(--color-blush-bloom);
  border-color: var(--color-blush-bloom);
  letter-spacing: 0.04em;
}

.pill--filled {
  background: var(--color-ink-black);
  color: var(--color-paper-white);
}

a.pill:hover,
button.pill:hover {
  background: var(--color-ink-black);
  color: var(--color-paper-white);
  cursor: pointer;
}

a.pill--seal:hover {
  background: var(--color-ink-black);
  border-color: var(--color-ink-black);
  color: var(--color-paper-white);
}

a.pill--filled:hover {
  background: var(--color-paper-white);
  color: var(--color-ink-black);
}

/* ----------------------------------------------------------------------------
   Header — blush seal left, outlined nav pills right
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-12);
  padding: var(--spacing-14) var(--page-pad);
  background: var(--color-paper-white);
}

.site-nav {
  display: flex;
  gap: var(--spacing-7);
  flex-wrap: wrap;
}

/* Each nav pill carries its section's accent. When that section is the one
   in view (.is-active, set by app.js) — or on hover — the pill fills with it,
   exactly like Anacuna's PLAY=yellow / ABOUT=green section switching. */
.nav-link[data-accent="work"]    { --nav-accent: var(--accent-work); }
.nav-link[data-accent="about"]   { --nav-accent: var(--accent-about); }
.nav-link[data-accent="pricing"] { --nav-accent: var(--accent-pricing); }
.nav-link[data-accent="contact"] { --nav-accent: var(--accent-contact); }

a.pill.nav-link.is-active,
a.pill.nav-link:hover {
  background: var(--nav-accent);
  border-color: var(--nav-accent);
  color: var(--color-ink-black);
}

/* ----------------------------------------------------------------------------
   Hero line — one 31px statement
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(48px, 9vw, 110px) var(--page-pad) clamp(40px, 7vw, 80px);
}

.hero__statement {
  font-size: var(--text-heading-fluid);
  line-height: var(--leading-heading-sm);
  max-width: 22ch;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-10);
  margin-top: var(--spacing-21);
  flex-wrap: wrap;
}

/* blush dot — the only other place blush appears, the live "spots" tick */
.spots-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-blush-bloom);
}

/* ----------------------------------------------------------------------------
   Index — the 7 service rows (the centerpiece)
   -------------------------------------------------------------------------- */
.index {
  border-top: 1px solid var(--color-ink-black);
}

.index__head {
  position: relative;
  z-index: 1; /* the head sheet sits above the first folded row */
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-7);
  background: var(--color-paper-white);
  padding: var(--spacing-14) var(--page-pad);
  border-bottom: 1px solid var(--color-ink-black);
}

/* The two tabs (SELECTED DISCIPLINES / PORTFOLIO): outlined pills that fill
   with their accent when active. They reuse the .section-label sizing. */
/* [data-accent] raises specificity above the generic accent-fill rule below,
   so an inactive tab reads plain white instead of keeping its section color. */
.section-label.section-tab[data-accent] {
  margin-bottom: 0;
  cursor: pointer;
  background: var(--color-paper-white);
  border: 1px solid var(--color-ink-black);
  color: var(--color-ink-black);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.section-label.section-tab:hover {
  background: var(--color-ink-black);
  border-color: var(--color-ink-black);
  color: var(--color-paper-white);
}

.section-label.section-tab.is-active[data-accent="work"] {
  background: var(--accent-work);
  border-color: var(--accent-work);
  color: var(--color-ink-black);
}

.section-label.section-tab.is-active[data-accent="portfolio"] {
  background: var(--accent-portfolio);
  border-color: var(--accent-portfolio);
  color: var(--color-ink-black);
}

/* Row groups — whichever view is showing gets the closing hairline under its
   last row (so ARCHITECTURE / ATLAS is closed off, like PRODUCT above it).
   Opacity is animated for the tab "morph"; app.js swaps the hidden attribute. */
.index__rows {
  border-bottom: 1px solid var(--color-ink-black);
  transition: opacity 0.24s ease;
}

.index__rows[hidden] {
  display: none;
}

/* Folded-over scaffolding: every row is an OPAQUE white sheet with a top
   hairline, pulled up over the row above it via a negative margin. Because
   later rows paint after earlier ones, each lower row sits IN FRONT — its
   white fill covers the bottom of the row above, so the titles overlap with
   real depth (e.g. PRODUCT tucks behind ARCHITECTURE), exactly like Anacuna. */
.service-row {
  position: relative;
  display: flex;
  align-items: flex-end; /* land the word baseline on the bottom divider line */
  justify-content: space-between;
  gap: var(--spacing-14);
  /* font-size drives the em used by the padding below */
  font-size: clamp(44px, 9.6vw, 124px);
  padding: 0.18em var(--page-pad) 0.06em;
  background: var(--color-paper-white);
  border-top: 1px solid var(--color-ink-black);
  transition: color 0.18s ease;
}

/* Hovered row lifts to the very front of the fold and floods with its color */
.service-row:hover {
  z-index: 2;
}

/* The color wipe — a sheet of the row's signature color that sweeps in from
   the left on hover (Anacuna's PRIDE-2023 purple flood). Sits above the white
   fill but below the text. */
.service-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--row-color, var(--color-blush-bloom));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.22, 0.72, 0.16, 1);
}

.service-row:hover::before {
  transform: scaleX(1);
}

/* Keep the title + tag above the color wipe */
.service-row > * {
  position: relative;
  z-index: 1;
}

.service-row__title {
  font-size: 1em;
  line-height: 0.78; /* trims the cap's leading so the baseline meets the line */
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.02em;
  white-space: nowrap; /* bleed past the right edge */
}

.service-row__tag {
  flex: none;
  align-self: center; /* keep the pill centered in the row band */
  font-size: var(--text-body);
}

/* ----------------------------------------------------------------------------
   About / manifesto
   -------------------------------------------------------------------------- */
.about {
  padding: var(--section-gap) var(--page-pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.about__lead {
  font-size: var(--text-heading-fluid);
  line-height: var(--leading-heading-sm);
}

.about__body p {
  font-size: var(--text-body);
  line-height: 1.5;
  max-width: 46ch;
}

.about__body p + p {
  margin-top: var(--spacing-14);
}

/* Section eyebrow — a small filled pill in the section's signature color */
.section-label {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-body);
  line-height: 1;
  padding: var(--spacing-7) var(--spacing-14);
  border-radius: var(--radius-pill);
  margin-bottom: var(--spacing-21);
  background: var(--color-blush-bloom);
  color: var(--color-ink-black);
  letter-spacing: 0.04em;
}

.section-label[data-accent="work"]    { background: var(--accent-work); }
.section-label[data-accent="about"]   { background: var(--accent-about); }
.section-label[data-accent="pricing"] { background: var(--accent-pricing); }
.section-label[data-accent="contact"] { background: var(--accent-contact); }

/* ----------------------------------------------------------------------------
   Pricing — the Designjoy gag
   -------------------------------------------------------------------------- */
.pricing {
  padding: var(--section-gap) var(--page-pad);
  border-top: 1px solid var(--color-ink-black);
}

.pricing__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--spacing-14);
  margin-top: var(--spacing-21);
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-14);
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--color-ink-black);
  border-radius: var(--radius-pill);
  min-height: 340px;
}

/* The two paid tiers lift on hover for a premium, tactile response. */
.price-card[data-celebrate] {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.price-card[data-celebrate]:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.09);
}

/* Free card — the sanctioned dark inversion so it dominates without blush */
.price-card--free {
  background: var(--color-ink-black);
  color: var(--color-paper-white);
}

.price-card__eyebrow {
  font-size: var(--text-body);
  display: flex;
  align-items: center;
  gap: var(--spacing-7);
}

.price-card__headline {
  font-size: var(--text-heading-fluid);
  line-height: 1.05;
  font-weight: var(--font-weight-regular);
}

.price-card__price {
  font-size: var(--text-heading-fluid);
  line-height: 1;
}

.price-card__price s {
  text-decoration-thickness: 1px;
}

.price-card__note {
  font-size: var(--text-body);
  line-height: 1.4;
  margin-top: auto;
}

/* Fine print — a deliberate exception to the 3-size system for the
   legal-style contract caveat on the $1 card. */
.price-card__fine {
  font-size: 11px;
  line-height: 1.3;
  opacity: 0.6; /* reads as fine print on the dark card */
  margin-top: var(--spacing-7);
}

.price-card .pill {
  align-self: flex-start;
}

/* CTA pill inside the dark free card: green fill, white text */
.price-card--free .pill--cta {
  background: #1faa59;
  color: var(--color-paper-white);
  border-color: #1faa59;
}

.price-card--free .pill--cta:hover {
  background: #178646;
  border-color: #178646;
  color: var(--color-paper-white);
}

/* ----------------------------------------------------------------------------
   Contact / CTA
   -------------------------------------------------------------------------- */
.contact {
  padding: var(--section-gap) var(--page-pad);
  border-top: 1px solid var(--color-ink-black);
}

.contact__statement {
  font-size: var(--text-display-fluid);
  line-height: var(--leading-display);
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.contact__statement a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.08em;
}

.contact__actions {
  display: flex;
  gap: var(--spacing-10);
  flex-wrap: wrap;
  margin-top: var(--spacing-21);
}

/* ----------------------------------------------------------------------------
   Footer bar
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-12);
  padding: var(--spacing-14) var(--page-pad);
  border-top: 1px solid var(--color-ink-black);
  font-size: var(--text-body);
}

.site-footer__links {
  display: flex;
  gap: var(--spacing-12);
}

.site-footer a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

/* ----------------------------------------------------------------------------
   Discipline detail — full-screen colored takeover (Anacuna project page)
   -------------------------------------------------------------------------- */
.detail {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-14) var(--page-pad) clamp(28px, 6vh, 64px);
  background: var(--detail-color, var(--color-blush-bloom));
  color: var(--color-ink-black);
  overflow-y: auto;
  visibility: hidden;
  transform: translateY(100%); /* parked just below the viewport */
  transition: transform 0.52s cubic-bezier(0.2, 0.7, 0.18, 1),
    visibility 0s linear 0.52s, background-color 0.42s ease;
}

.detail.is-open {
  visibility: visible;
  transform: translateY(0); /* slides up into view */
  transition: transform 0.52s cubic-bezier(0.2, 0.7, 0.18, 1),
    visibility 0s, background-color 0.42s ease;
}

.detail__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-12);
}

/* On the colored page, hovering a pill inverts to ink (matches the index) */
.detail .pill.detail__back:hover {
  background: var(--color-ink-black);
  color: var(--color-paper-white);
}

.detail__body {
  margin-top: auto; /* anchor content toward the lower third, editorial */
  padding-top: clamp(48px, 12vh, 140px);
}

.detail__head {
  display: flex;
  align-items: center;
  gap: var(--spacing-14);
  flex-wrap: wrap;
}

.detail__title {
  font-size: clamp(54px, 12vw, 150px);
  line-height: 0.88;
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-regular);
  /* staggered reveal */
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.18, 1);
}

.detail__blurb {
  font-size: var(--text-heading-fluid);
  line-height: 1.22;
  max-width: 34ch;
  margin-top: var(--spacing-21);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.18, 1);
}

.detail__actions {
  display: flex;
  gap: var(--spacing-10);
  flex-wrap: wrap;
  margin-top: clamp(24px, 4vw, 40px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.18, 1);
}

/* Stagger the reveal once the panel is open */
.detail.is-open .detail__title  { opacity: 1; transform: none; transition-delay: 0.10s; }
.detail.is-open .detail__blurb  { opacity: 1; transform: none; transition-delay: 0.18s; }
.detail.is-open .detail__actions { opacity: 1; transform: none; transition-delay: 0.26s; }

/* Lock the page behind the open overlay */
body.detail-open {
  overflow: hidden;
}

/* ----------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .about {
    grid-template-columns: 1fr;
  }
  .pricing__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
    gap: var(--spacing-10);
  }
  /* Keep the folded single-line titles bleeding; drop the tags so the
     oversized type can overlap cleanly without colliding with a pill. */
  .service-row__tag {
    display: none;
  }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
