/* ============================================================
   Personal brand — Tide & Coral.
   Calm coastal: shell-white & beige base, deep turquoise
   signature, soft aqua washes, a sunset-coral warm note.
   Palette + type + base system. Used across all 6 pages.
   ============================================================ */

:root {
  /* Surfaces — warm shell white drifting to greige seafoam */
  --bg:           #F7F4EC;
  --surface:      #ECEFE7;
  --surface-alt:  #E1E7DD;

  /* Accents.
     The legacy slot names (terracotta/sage/honey) are kept so every
     page cascades cleanly — but they now carry coastal colours:
     terracotta = turquoise signature, sage = soft aqua, honey = coral. */
  --terracotta:   #0C857C;   /* deep turquoise-teal — the signature */
  --terracotta-2: #0A6E66;   /* deeper teal for hovers */
  --sage:         #6FB3AC;   /* soft seafoam aqua */
  --honey:        #E6896B;   /* sunset coral */
  --green:        #2F9E89;   /* sea green — live status */

  /* Convenience aliases (use going forward) */
  --teal:         var(--terracotta);
  --aqua:         var(--sage);
  --coral:        var(--honey);

  /* Text — deep ocean ink, cool greys */
  --ink:          #16302C;
  --ink-2:        #51635E;
  --ink-3:        #93A39D;

  /* Lines */
  --border:       #E2E3D8;
  --border-2:     #CED5CB;

  /* Shadow — cool ocean, soft, never harsh */
  --shadow-sm: 0 2px 10px rgba(16, 64, 58, 0.05);
  --shadow:    0 4px 24px rgba(16, 64, 58, 0.07);
  --shadow-lg: 0 10px 40px rgba(16, 64, 58, 0.11);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Type */
  --display: "Newsreader", "Cormorant Garamond", Georgia, serif;
  --body:    "Hanken Grotesk", "DM Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle paper grain — applied via body::before so it sits behind everything */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.06  0 0 0 0 0.20  0 0 0 0 0.18  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

main, header, footer { position: relative; z-index: 1; }

/* Typography ============================================== */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; }
h3 { font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.2; }

p { margin: 0 0 1em; line-height: 1.75; text-wrap: pretty; }

em, .italic {
  font-style: italic;
  font-family: var(--display);
  font-weight: 300;
  color: var(--ink);
}

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.warm-brown { color: var(--ink-2); }
.muted { color: var(--ink-3); }
.terracotta { color: var(--terracotta); }

a { color: var(--terracotta); text-decoration: none; transition: opacity .3s var(--ease); }
a:hover { opacity: 0.7; }

/* Layout containers ============================================== */
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.wrap-narrow { width: min(780px, 92vw); margin: 0 auto; }
.wrap-wide { width: min(1320px, 94vw); margin: 0 auto; }

section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }

.surface-section { background: var(--surface); }
.surface-alt-section { background: var(--surface-alt); }

/* Soft watercolor washes used between sections */
.wash {
  position: absolute; pointer-events: none; z-index: 0;
  filter: blur(60px);
  opacity: 0.4;
}
.wash.terracotta { background: radial-gradient(closest-side, rgba(12,133,124,0.30), transparent 70%); }
.wash.sage      { background: radial-gradient(closest-side, rgba(111,179,172,0.38), transparent 70%); }
.wash.honey     { background: radial-gradient(closest-side, rgba(230,137,107,0.30), transparent 70%); }

/* Nav ============================================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 244, 236, 0.0);
  backdrop-filter: blur(0px);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s var(--ease);
  padding: 22px 0;
}
.nav.scrolled {
  background: rgba(247, 244, 236, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(12, 133, 124, 0.07), 0 8px 30px rgba(16, 64, 58, 0.05);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-left { display: flex; align-items: baseline; gap: 10px; }

/* Sapana Labs studio tab — the prominent way in */
.nav-studio {
  position: relative;
  display: inline-flex; align-items: baseline;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: -0.005em;
  color: var(--terracotta);
  line-height: 1;
  padding: 0 6px 2px;
  border: none;
  background: none;
  border-radius: 0;
  transition: color .3s var(--ease);
}
.nav-studio::before { content: none; }
.nav-studio .ns-mark {
  display: inline-block;
  width: 54px; height: auto;
  margin-left: 10px;
  vertical-align: middle;
  opacity: 0.9;
  transition: opacity .3s var(--ease);
}
.nav-studio .ns-mark .stroke { stroke: var(--ink-2); }
.nav-studio .ns-mark .dot { fill: var(--teal); }
.nav-studio:hover .ns-mark { opacity: 1; }
.nav-studio:hover { color: var(--terracotta); transform: none; }
.nav-studio.active { color: var(--terracotta); }
.brand {
  font-family: var(--display);
  font-size: 1.9rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand .dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--terracotta);
  border-radius: 50%;
  margin-left: 5px; vertical-align: baseline;
  transform: translateY(1px);
}
.brand-x {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.55rem;
  color: var(--terracotta);
  line-height: 1;
  padding: 0 4px;
  display: inline-block;
  transform: translateY(-2px);
  letter-spacing: 0;
}
.nav-links {
  display: flex; gap: 6px; align-items: center;
  list-style: none; padding: 0; margin: 0;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 0.92rem;
  position: relative;
  z-index: 0;
  padding: 8px 16px;
  border-radius: 999px;
  transition: color .3s var(--ease);
}
.nav-links a::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 999px;
  background: rgba(12, 133, 124, 0.08);
  transform: scale(0.82);
  opacity: 0;
  z-index: -1;
  transition: transform .38s var(--ease), opacity .38s var(--ease);
}
.nav-links a:hover::before { transform: scale(1); opacity: 1; }
.nav-links a:hover { color: var(--terracotta); opacity: 1; }
.nav-links a.active { color: var(--terracotta); }
.nav-links a.active::before { transform: scale(1); opacity: 1; background: rgba(12, 133, 124, 0.13); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--honey), var(--terracotta));
  z-index: 200;
  transition: width .15s linear;
}

/* Buttons & pills ============================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  background: var(--terracotta);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: var(--terracotta-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(12, 133, 124, 0.26);
  opacity: 1;
}
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-2);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.pill.active, .pill:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--bg);
}
.pill.sage { border-color: rgba(111,179,172,0.55); color: #2f8f87; }
.pill.honey { border-color: rgba(230,137,107,0.5); color: #c0664a; }
.pill.terracotta-soft { border-color: rgba(12,133,124,0.4); color: var(--terracotta); }

/* Mono label / eyebrow */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--ink-3);
}

/* Cards ============================================== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
}

/* Image placeholder block */
.img-placeholder {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg,
      rgba(12, 133, 124, 0.05) 0 12px,
      rgba(12, 133, 124, 0.0)  12px 24px),
    linear-gradient(135deg, var(--surface), var(--surface-alt));
  border: 1px solid var(--border);
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
}
.img-placeholder .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: rgba(247,244,236,0.85);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Reveal animation — gentle drift */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Word-by-word reveal */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.word.in { opacity: 1; transform: translateY(0); }

/* Custom cursor (desktop only) */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(12, 133, 124, 0.15);
  border: 1px solid rgba(12, 133, 124, 0.5);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), opacity .3s var(--ease);
  mix-blend-mode: multiply;
  opacity: 0;
}
.cursor.show { opacity: 1; }
.cursor.hover {
  width: 44px; height: 44px;
  background: rgba(12, 133, 124, 0.20);
}
.cursor.click {
  width: 14px; height: 14px;
  background: rgba(12, 133, 124, 0.42);
}
@media (hover: none) { .cursor { display: none; } }

/* Scroll indicator */
.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-cue .arrow {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, transparent, var(--terracotta));
  position: relative;
  animation: drift 2.2s ease-in-out infinite;
}
.scroll-cue .arrow::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 8px; height: 8px;
  border-right: 1px solid var(--terracotta);
  border-bottom: 1px solid var(--terracotta);
  transform: translateX(-50%) rotate(45deg);
}
@keyframes drift {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* Marquee / philosophy strip */
.ticker {
  background: var(--surface-alt);
  padding: 22px 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(-0.6deg);
  margin: 60px 0;
}
.ticker-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: scroll-x 50s linear infinite;
  width: max-content;
}
.ticker-track span {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: var(--ink-2);
}
.ticker-track .sep {
  color: var(--terracotta);
  font-size: 1.2rem;
  line-height: 0.6;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* Footer ============================================== */
footer.site-footer {
  background: var(--surface);
  border-top: 1px solid;
  border-image: linear-gradient(90deg, transparent, var(--honey), transparent) 1;
  padding: 70px 0 40px;
  margin-top: 80px;
}
footer .foot-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}
footer .foot-name {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.6rem;
}
footer .foot-tagline {
  color: var(--ink-2);
  margin-top: 8px;
  max-width: 360px;
}
footer .foot-where {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 18px;
}
footer .foot-links {
  display: flex; flex-direction: column; gap: 10px;
  align-items: flex-end;
}
footer .foot-links a {
  font-size: 0.95rem;
  color: var(--terracotta);
}
footer .foot-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

@media (max-width: 720px) {
  footer .foot-top { grid-template-columns: 1fr; gap: 30px; }
  footer .foot-links { align-items: flex-start; }
  footer .foot-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============================================================
   Mobile navigation — hamburger + full-screen overlay.
   Injected toggle (shared.js) + this CSS give every page a
   working mobile menu without touching desktop layout.
   ============================================================ */
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center;
    gap: 6px; width: 46px; height: 46px; padding: 0 11px;
    margin: -6px 0; background: none; border: none; cursor: pointer;
    position: relative; z-index: 215; flex: 0 0 auto;
  }
  .nav-toggle .nt-bar {
    display: block; width: 24px; height: 2px; border-radius: 2px;
    background: var(--ink);
    transition: transform .42s var(--ease), opacity .3s var(--ease);
  }
  body.nav-open .nav-toggle .nt-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle .nt-bar:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle .nt-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* The <nav> becomes a full-screen overlay */
  header.nav > .wrap > nav {
    position: fixed; inset: 0; z-index: 205;
    display: flex; align-items: center; justify-content: center;
    background: rgba(247, 244, 236, 0.98);
    -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .45s var(--ease), visibility .45s var(--ease);
  }
  body.nav-open header.nav > .wrap > nav { opacity: 1; visibility: visible; pointer-events: auto; }

  .nav-links {
    flex-direction: column; align-items: center; gap: 4px;
  }
  .nav-links li {
    opacity: 0; transform: translateY(12px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
  }
  body.nav-open .nav-links li { opacity: 1; transform: none; }
  body.nav-open .nav-links li:nth-child(1) { transition-delay: .08s; }
  body.nav-open .nav-links li:nth-child(2) { transition-delay: .13s; }
  body.nav-open .nav-links li:nth-child(3) { transition-delay: .18s; }
  body.nav-open .nav-links li:nth-child(4) { transition-delay: .23s; }
  body.nav-open .nav-links li:nth-child(5) { transition-delay: .28s; }
  body.nav-open .nav-links li:nth-child(6) { transition-delay: .33s; }
  .nav-links a {
    font-family: var(--display); font-weight: 400; font-style: italic;
    font-size: clamp(1.9rem, 8vw, 2.6rem); color: var(--ink);
    padding: 10px 24px; border-radius: 0; letter-spacing: -0.01em;
  }
  .nav-links a::before { display: none; }
  .nav-links a.active { color: var(--terracotta); }
  .nav-links a.active::before { display: none; }

  /* Keep the top bar readable while menu is open */
  body.nav-open .nav { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.nav-open { overflow: hidden; }
}

/* Brand marks scale down so "Manish x Sapana Labs" always fits */
@media (max-width: 600px) {
  .brand { font-size: 1.4rem; }
  .brand-x { font-size: 1.2rem; }
  .nav-studio { font-size: 1.4rem; }
  .nav-studio .ns-mark { width: 40px; margin-left: 7px; }
  .nav-left { gap: 7px; }
}
@media (max-width: 380px) {
  .brand { font-size: 1.22rem; }
  .nav-studio { font-size: 1.22rem; }
  .nav-studio .ns-mark { width: 34px; }
}

/* Section dividers — soft watercolor edge */
.divider-soft {
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--surface) 60%);
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 158, 137, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 10px;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 158, 137, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(47, 158, 137, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 158, 137, 0); }
}

/* Common section header */
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 30px; margin-bottom: 60px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 18ch; }

/* Selection */
::selection { background: rgba(12, 133, 124, 0.20); color: var(--ink); }
