/* IV Technologies — subtle Indus-Valley-themed studio site.
   Palette: sandstone + baked terracotta + deep indigo-ink + river teal.
   Motifs: seal emblem, planned grid, measured (mono) labels. */

:root {
  --sand:        #F5EFE3;   /* page */
  --sand-2:      #EFE7D7;   /* alt sections / cards */
  --sand-3:      #E9DFCB;   /* deeper wells */
  --ink:         #23272B;   /* charcoal-ink text */
  --ink-2:       #4E5860;   /* secondary text */
  --terracotta:  #B4552E;   /* primary accent (baked clay) */
  --terracotta-d:#98452408; /* unused-safe */
  --clay-deep:   #8F4324;
  --ochre:       #C08A3C;
  --teal:        #2E6C68;   /* river / indigo dye */
  --line:        #DFD3BC;   /* hairline */
  --line-soft:   #E7DECC;
  --ink-cta:     #1F262A;   /* dark contact band */
  --radius:      18px;
  --wrap:        1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

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

/* ── Shared type ─────────────────────────────────────── */
.kicker {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 14px;
}
.kicker-light { color: #E7A46F; }

.display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--clay-deep);
}

.h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.lead, .section-sub {
  color: var(--ink-2);
  font-size: 1.12rem;
  max-width: 40ch;
}

/* ── Seal emblem ─────────────────────────────────────── */
.brand-seal { display: inline-flex; width: 34px; height: 34px; }
.brand-seal.small { width: 26px; height: 26px; }
.brand-seal svg { width: 100%; height: 100%; }
.seal-frame { fill: none; stroke: var(--terracotta); stroke-width: 2.4; }
.seal-mark  { fill: none; stroke: var(--ink); stroke-width: 2.6;
              stroke-linecap: round; stroke-linejoin: round; }
.seal-dot   { fill: var(--terracotta); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  max-width: var(--wrap); margin: 0 auto;
  backdrop-filter: saturate(140%) blur(10px);
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: transparent;
}
.nav.scrolled {
  background: rgba(245,239,227,0.82);
}
.nav.scrolled::after { background: var(--line); }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-word {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.95rem; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 999px;
  background: var(--sand-2);
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--terracotta); background: #fff; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.98rem; font-weight: 500;
  padding: 14px 24px; border-radius: 999px;
  transition: transform .15s ease, background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--terracotta); color: #fff; }
.btn-solid:hover { background: var(--clay-deep); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--terracotta); color: var(--clay-deep); }
.btn-light {
  background: var(--sand); color: var(--ink);
  font-family: 'Space Mono', monospace; letter-spacing: 0.02em;
}
.btn-light:hover { background: #fff; }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 70px 0 96px; }
.hero-inner { position: relative; z-index: 2; max-width: 860px; }

/* faint planned-city grid */
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(120% 90% at 20% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(120% 90% at 20% 0%, #000 0%, transparent 72%);
}
/* oversized faint seal watermark */
.hero-seal {
  position: absolute; right: -60px; top: 40px; z-index: 1;
  width: min(46vw, 520px); color: var(--terracotta);
  opacity: 0.10; pointer-events: none;
}
.hero-seal svg { width: 100%; height: auto; }

.hero-actions { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; }
.hero-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap;
}
.hero-meta .dot { color: var(--terracotta); }

/* ── Decorative band (intersecting arcs — pottery motif) ── */
.band {
  height: 26px;
  background-color: var(--sand);
  background-image:
    radial-gradient(circle at 13px -6px, transparent 15px, var(--line) 15px, var(--line) 16px, transparent 16px),
    radial-gradient(circle at 0 -6px, transparent 15px, var(--line) 15px, var(--line) 16px, transparent 16px);
  background-size: 26px 26px;
  background-position: 0 12px;
  opacity: 0.9;
}

/* ── Sections ────────────────────────────────────────── */
.section { padding: 90px 0; }
.section-alt { background: var(--sand-2); }
.section-head { max-width: 640px; margin-bottom: 48px; }

/* ── Service cards ───────────────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.card {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  position: relative;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.section-alt .card { background: var(--sand); }
.section:not(.section-alt) .card { background: var(--sand-2); }
.card:hover {
  transform: translateY(-4px);
  border-color: var(--terracotta);
  box-shadow: 0 18px 40px -28px rgba(143,67,36,0.5);
}
.card-num {
  font-family: 'Space Mono', monospace; font-size: 0.8rem;
  color: var(--terracotta); letter-spacing: 0.1em;
}
.card h3 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.22rem; margin: 14px 0 8px;
}
.card p { color: var(--ink-2); font-size: 0.97rem; margin: 0; }

/* ── Work ────────────────────────────────────────────── */
.work { display: grid; gap: 16px; }
.work-item {
  display: grid; grid-template-columns: 92px 1fr; gap: 22px;
  align-items: start;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.work-item:hover {
  transform: translateY(-3px);
  border-color: var(--terracotta);
  box-shadow: 0 20px 44px -30px rgba(143,67,36,0.55);
}
.work-glyph {
  width: 76px; height: 76px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--sand-3); color: var(--terracotta);
}
.work-glyph svg { width: 46px; height: 46px; }
/* real app icon fills the tile */
.work-glyph--app { background: transparent; padding: 0; overflow: hidden; box-shadow: 0 6px 16px -8px rgba(35,39,43,0.35); }
.work-glyph--app img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block; }
/* App Store download link */
.work-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Space Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700;
  color: var(--terracotta); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.work-link:hover { color: var(--clay-deep); border-bottom-color: currentColor; }
.work-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.work-body h3 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.5rem; margin: 0;
}
.work-body p { color: var(--ink-2); margin: 8px 0 12px; max-width: 62ch; }
.tag {
  font-family: 'Space Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
}
.tag-live { color: var(--teal); border-color: rgba(46,108,104,0.4); background: rgba(46,108,104,0.07); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chips li {
  font-size: 0.78rem; color: var(--ink-2);
  padding: 4px 11px; border-radius: 999px; background: var(--sand-3);
}

/* ── Principles ──────────────────────────────────────── */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.principle { padding-top: 6px; }
.p-icon {
  display: inline-flex; width: 40px; height: 40px; color: var(--terracotta);
  margin-bottom: 16px;
}
.p-icon svg { width: 100%; height: 100%; }
.principle h3 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.14rem; margin: 0 0 8px;
}
.principle p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }

/* ── About ───────────────────────────────────────────── */
.about-inner {
  display: grid; grid-template-columns: 200px 1fr; gap: 56px; align-items: center;
}
.about-mark { color: var(--terracotta); opacity: 0.9; }
.about-mark svg { width: 100%; height: auto; }
.about-text p { color: var(--ink-2); max-width: 56ch; }
.about-quiet {
  margin-top: 18px; padding-left: 18px;
  border-left: 2px solid var(--terracotta);
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 1.08rem; color: var(--ink) !important;
}

/* ── CTA band ────────────────────────────────────────── */
.cta {
  background: var(--ink-cta); color: var(--sand);
  padding: 84px 0; text-align: center;
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(180,85,46,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,85,46,0.16) 1px, transparent 1px);
  background-size: 46px 46px; opacity: 0.5;
  -webkit-mask-image: radial-gradient(80% 120% at 50% 0%, #000, transparent 70%);
          mask-image: radial-gradient(80% 120% at 50% 0%, #000, transparent 70%);
}
.cta-inner { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
.cta-title {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.06;
  letter-spacing: -0.015em; margin: 0 0 14px;
}
.cta-sub { color: #C9BFA9; margin: 0 auto 28px; max-width: 46ch; }

/* ── Footer ──────────────────────────────────────────── */
.footer { padding: 44px 0 38px; border-top: 1px solid var(--line); }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif; font-weight: 600;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 0.92rem; color: var(--ink-2); transition: color .2s; }
.footer-links a:hover { color: var(--terracotta); }

.footer-legal { padding: 22px 0 6px; }
.footer-legal p { margin: 0 0 7px; font-size: 0.9rem; line-height: 1.6; color: var(--ink-2); }
.footer-legal a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); }
.footer-legal a:hover { color: var(--terracotta); }
.footer-legal .sep { color: var(--line); margin: 0 8px; }
/* Highlights the placeholders you still need to fill in. */
.ph { font-family: 'Space Mono', monospace; font-size: 0.86em; color: var(--terracotta); }

.footer-fine {
  font-family: 'Space Mono', monospace; font-size: 0.76rem;
  color: var(--ink-2); margin: 12px 0 0; letter-spacing: 0.02em;
}

/* ── Legal pages (privacy / terms) ───────────────────── */
.legal-page { max-width: 760px; margin: 0 auto; padding: 40px 28px 96px; }
.legal-page .eyebrow {
  font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta);
  margin: 0 0 10px;
}
.legal-page h1 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.015em;
  margin: 0 0 8px; line-height: 1.05;
}
.legal-updated {
  font-family: 'Space Mono', monospace; font-size: 0.8rem;
  color: var(--ink-2); margin: 0 0 26px;
}
.legal-page h2 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 1.28rem; margin: 34px 0 10px;
}
.legal-page p, .legal-page li { color: var(--ink-2); font-size: 1rem; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin-bottom: 6px; }
.legal-page .lead { color: var(--ink); font-size: 1.1rem; }
.legal-rule { height: 1px; background: var(--line); border: 0; margin: 4px 0 28px; }
.legal-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 30px;
}
.legal-back:hover { color: var(--terracotta); }
.legal-foot {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 0.9rem; color: var(--ink-2);
}

/* ── Reveal on scroll ────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 940px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 120px 1fr; gap: 34px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 64px 0; }
  .cards, .principles { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: 1fr; gap: 16px; }
  .work-glyph { width: 60px; height: 60px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-mark { width: 96px; }
  .hero-seal { opacity: 0.07; right: -80px; }
}
