/* =========================================================
   CloudAurum Site Styles
   Sprint v2 — 2026-05-11
   Depends on tokens.css
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-body);
  color: var(--text-body);
  background: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
}

img, picture, video, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ---------- 2. Base typography ---------- */
h1, h2, h3, .display {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 400;
  line-height: var(--lh-headline);
  letter-spacing: var(--track-headline);
}
h1 { font-size: var(--font-h1); line-height: var(--lh-display); letter-spacing: var(--track-display); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); }
h4 {
  font-family: var(--font-sans);
  font-size: var(--font-h4);
  font-weight: 600;
  color: var(--text-primary);
  line-height: var(--lh-tight);
}
p { font-family: var(--font-sans); color: var(--text-body); }
p + p { margin-top: 1em; }

.lead { font-size: var(--font-body-lg); line-height: var(--lh-prose); color: var(--text-body); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--font-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--gold);
}
.caption { font-size: var(--font-caption); color: var(--text-muted); letter-spacing: 0.01em; }
.display-xl {
  font-family: var(--font-serif);
  font-size: var(--font-display-xl);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  font-weight: 400;
}
.display-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ---------- 3. Container utilities ---------- */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-pad); }
.container-narrow { max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--container-pad); }
.container-prose { max-width: var(--container-prose); margin-inline: auto; padding-inline: var(--container-pad); }
section { padding-block: var(--section-pad-y); }
section.tight { padding-block: var(--section-pad-y-tight); }

/* ---------- 4. Link defaults ---------- */
a { color: inherit; text-decoration: none; transition: color var(--dur-quick) var(--ease-out); }
a:hover { color: var(--gold); }
.link-underline { border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: border-color var(--dur-quick) var(--ease-out); }
.link-underline:hover { border-bottom-color: var(--gold); color: var(--gold); }

/* ---------- 5. Selection ---------- */
::selection { background: var(--gold-medium); color: var(--text-primary); }
.on-dark ::selection { background: var(--gold-medium); color: var(--text-on-dark); }

/* =========================================================
   COMPONENT: Logo
   ========================================================= */
.logo-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  font-family: var(--font-wordmark);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  transition: opacity var(--dur-quick) var(--ease-out);
}
.logo-link:hover { color: var(--text-primary); opacity: 0.85; }
.logo-link .a-accent { color: var(--gold); }
.on-dark .logo-link { color: var(--text-on-dark); }
.on-dark .logo-link .a-accent { color: var(--gold-light); }

/* =========================================================
   COMPONENT: Nav
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              backdrop-filter var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(244, 243, 241, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: var(--border-subtle);
}
.nav.scrolled.on-dark-nav {
  background: rgba(14, 13, 11, 0.78);
  border-bottom-color: var(--border-on-dark);
}
.nav.on-dark-nav .logo-link { color: var(--text-on-dark); }
.nav.on-dark-nav .logo-link .a-accent { color: var(--gold-light); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  font-size: var(--font-body-sm);
  font-weight: 500;
}
.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 0;
}
.nav.on-dark-nav .nav-links a { color: var(--text-on-dark); }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--text-primary);
  color: var(--bg-page) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--font-body-sm);
  transition: all var(--dur-quick) var(--ease-out);
}
.nav-cta:hover {
  background: #000;
  color: var(--bg-page) !important;
  transform: translateY(-1px);
}
.nav.on-dark-nav .nav-cta {
  background: var(--bg-page);
  color: var(--text-primary) !important;
}
.nav.on-dark-nav .nav-cta:hover { background: #fff; color: var(--text-primary) !important; }
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-mobile span {
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all var(--dur-quick) var(--ease-out);
}
.nav.on-dark-nav .nav-mobile span { background: var(--text-on-dark); }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-page);
    padding: var(--sp-8);
    gap: var(--sp-6);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
  }
  .nav-mobile { display: flex; }
  .nav-mobile.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-mobile.active span:nth-child(2) { opacity: 0; }
  .nav-mobile.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* =========================================================
   COMPONENT: Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--font-body-sm);
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--dur-quick) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-page);
}
.btn-primary:hover {
  background: #000;
  color: var(--bg-page);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-light {
  background: var(--bg-page);
  color: var(--text-primary);
}
.btn-light:hover { background: #fff; color: var(--text-primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: currentColor;
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text-primary); background: rgba(28, 25, 23, 0.04); color: var(--text-primary); }
.on-dark .btn-ghost { border-color: var(--border-on-dark-strong); color: var(--text-on-dark); }
.on-dark .btn-ghost:hover { border-color: var(--text-on-dark); background: rgba(244, 243, 241, 0.05); color: var(--text-on-dark); }
.btn-gold {
  background: var(--gold);
  color: var(--bg-dark);
}
.btn-gold:hover {
  background: var(--gold-deep);
  color: var(--bg-page);
  transform: translateY(-1px);
}

/* =========================================================
   COMPONENT: Hero
   ========================================================= */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding-top: calc(var(--nav-h) + var(--sp-24));
  padding-bottom: var(--sp-24);
  overflow: hidden;
  isolation: isolate;
}
.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(176, 141, 87, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(212, 184, 122, 0.04), transparent 70%),
    linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-deeper) 100%);
}
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}
.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  color: var(--text-on-dark);
  font-size: var(--font-display-xl);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  font-weight: 400;
  margin-bottom: var(--sp-8);
  max-width: 760px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}
.hero .lead {
  color: var(--text-on-dark-body);
  font-size: var(--font-body-lg);
  max-width: 540px;
  margin-bottom: var(--sp-12);
}
.hero-actions {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  flex-wrap: wrap;
}
.hero-actions .btn-secondary {
  color: var(--text-on-dark);
  font-size: var(--font-body-sm);
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-quick) var(--ease-out);
}
.hero-actions .btn-secondary:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

/* =========================================================
   COMPONENT: Section structure
   ========================================================= */
.section-header {
  max-width: 760px;
  margin-bottom: var(--sp-24);
}
.section-header .eyebrow { display: inline-block; margin-bottom: var(--sp-4); }
.section-header h2 { margin-bottom: var(--sp-6); }
.section-header .lead { max-width: 640px; }

.section-warm { background: var(--bg-warm); }
.section-cream { background: var(--bg-cream); }
.section-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-on-dark); }
.section-dark p { color: var(--text-on-dark-body); }

/* =========================================================
   COMPONENT: Card grids
   ========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-10);
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card h4 { margin-bottom: var(--sp-3); font-size: 1.125rem; }
.card p { font-size: var(--font-body-sm); color: var(--text-body); line-height: var(--lh-body); }
.card-num {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.card-label {
  margin-top: var(--sp-6);
  display: inline-block;
  font-size: var(--font-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--gold);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.card-warm { background: var(--bg-warm); }
.card-cream { background: var(--bg-cream); }

/* =========================================================
   COMPONENT: Service tile
   ========================================================= */
.service-tile {
  background: var(--bg-cream);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--sp-12);
  transition: all var(--dur-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-tile:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.service-tile-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: var(--sp-4);
}
.service-tile h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: var(--track-headline);
  margin-bottom: var(--sp-3);
}
.service-tile .price {
  font-family: var(--font-sans);
  font-size: var(--font-body-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}
.service-tile p {
  flex-grow: 1;
  font-size: var(--font-body-sm);
  color: var(--text-body);
  line-height: var(--lh-prose);
  margin-bottom: var(--sp-8);
}
.service-tile .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-size: var(--font-body-sm);
  font-weight: 500;
  border-bottom: 1px solid var(--text-primary);
  padding-bottom: 1px;
  align-self: flex-start;
  transition: all var(--dur-quick) var(--ease-out);
}
.service-tile .learn-more:hover { color: var(--gold); border-bottom-color: var(--gold); }
.service-tile .learn-more::after { content: "→"; transition: transform var(--dur-quick) var(--ease-out); }
.service-tile .learn-more:hover::after { transform: translateX(2px); }

/* =========================================================
   COMPONENT: Process strip (4-phase)
   ========================================================= */
.process-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  position: relative;
}
.process-strip::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-medium) 20%, var(--gold-medium) 80%, transparent 100%);
}
.process-phase {
  position: relative;
  padding: var(--sp-4);
  text-align: left;
}
.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: var(--sp-8);
  position: relative;
  z-index: 1;
}
.section-dark .process-num { background: var(--bg-dark); border-color: var(--border-on-dark-strong); }
.process-phase h4 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: var(--sp-4);
  letter-spacing: var(--track-headline);
}
.process-phase p { font-size: var(--font-body-sm); line-height: var(--lh-body); color: var(--text-body); }
.section-dark .process-phase p { color: var(--text-on-dark-body); }
@media (max-width: 900px) {
  .process-strip { gap: var(--sp-3); }
  .process-num { width: 60px; height: 60px; font-size: 1.5rem; margin-bottom: var(--sp-6); }
  .process-strip::before { top: 30px; }
  .process-phase h4 { font-size: 1.25rem; }
}
@media (max-width: 768px) {
  .process-strip { grid-template-columns: 1fr; gap: var(--sp-6); }
  .process-strip::before { display: none; }
}

/* =========================================================
   COMPONENT: CTA Band
   ========================================================= */
.cta-band {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding-block: var(--section-pad-y-xl);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(176, 141, 87, 0.08), transparent 70%);
  pointer-events: none;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band .eyebrow { color: var(--gold-light); }
.cta-band h2 {
  color: var(--text-on-dark);
  font-size: clamp(2.5rem, 5vw, 4rem);
  max-width: 760px;
  margin-bottom: var(--sp-8);
}
.cta-band .lead { color: var(--text-on-dark-body); max-width: 640px; margin-bottom: var(--sp-10); }
.cta-band .note { font-size: var(--font-caption); color: var(--text-on-dark-muted); margin-top: var(--sp-4); }

/* =========================================================
   COMPONENT: Footer
   ========================================================= */
.footer {
  background: var(--bg-page);
  padding-block: var(--sp-16) var(--sp-10);
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; gap: var(--sp-8); } }
.footer-brand .logo-link { font-size: 32px; margin-bottom: var(--sp-4); }
.footer-tagline {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-body);
  max-width: 380px;
  margin-bottom: var(--sp-3);
}
.footer-entity { font-size: var(--font-caption); color: var(--text-muted); }
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.footer-meta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}
.footer-meta-group h5 {
  font-family: var(--font-sans);
  font-size: var(--font-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--gold);
  margin-bottom: var(--sp-2);
}
.footer-meta-group a, .footer-meta-group .item {
  display: block;
  font-size: var(--font-body-sm);
  color: var(--text-body);
  line-height: 1.4;
  padding: 4px 0;
}
.footer-meta-group a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-caption);
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* =========================================================
   Reveal animation (used by motion.js)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }

/* =========================================================
   Utilities
   ========================================================= */
.hidden { display: none !important; }
.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; }

.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.italic { font-style: italic; }
.serif { font-family: var(--font-serif); }
.center { text-align: center; }

.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--sp-2); }
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }
.mb-12 { margin-bottom: var(--sp-12); }
