/* ============================================================
   TAU MEDIA — Greco-Futuristic Design System
   Raw plaster gallery meets hypermodern web
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500&family=Inter+Tight:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Warm stone palette — limestone, plaster, aged marble */
  --stone-00: #faf6ef;   /* high plaster */
  --stone-05: #f3ecdf;   /* raw plaster (primary bg) */
  --stone-10: #ebe2d1;   /* shadow plaster */
  --stone-20: #d9ccb5;   /* travertine */
  --stone-30: #b9a890;   /* aged stone */
  --stone-40: #7a6b55;   /* deep shadow */

  /* Basalt — deep warm black, never pure */
  --ink-90: #1a1612;
  --ink-80: #2a2420;
  --ink-60: #4a4138;
  --ink-40: #746857;

  /* Aged bronze / amber — the gold that lights the gallery */
  --bronze-70: #8a5a2a;
  --bronze-50: #b37d3e;
  --bronze-40: #c89b55;
  --bronze-30: #dcb47a;
  --amber-glow: oklch(0.82 0.12 68);

  /* Type */
  --f-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-body: 'Inter Tight', -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Scale — classical proportions */
  --phi: 1.618;
  --unit: 8px;

  /* Layout */
  --page-max: 1440px;
  --page-pad: clamp(24px, 5vw, 96px);

  /* Motion */
  --ease-classical: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-monumental: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--stone-05);
  color: var(--ink-90);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body {
  overflow-x: hidden;
  /* Subtle plaster texture — noise + warm gradient */
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(200, 155, 85, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(138, 90, 42, 0.06), transparent 70%);
  background-attachment: fixed;
  position: relative;
}

/* Plaster grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.47  0 0 0 0 0.35  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Cursor-follow warm light */
.gallery-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    circle 600px at var(--mx, 50%) var(--my, 30%),
    rgba(220, 180, 122, 0.08),
    transparent 60%
  );
  transition: background 400ms var(--ease-classical);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.02;
  color: var(--ink-90);
}

.display-xl {
  font-family: var(--f-display);
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.display-xl em {
  font-style: italic;
  font-weight: 400;
  color: var(--bronze-50);
}

.display-l {
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.display-l em { font-style: italic; color: var(--bronze-50); font-weight: 400; }

.display-m {
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-70);
}

.label-roman {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-60);
  letter-spacing: 0.01em;
}

.lede {
  font-family: var(--f-body);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-80);
  font-weight: 400;
  max-width: 52ch;
}
.lede.serif {
  font-family: var(--f-display);
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink-80);
}

.small-mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-40);
  text-transform: uppercase;
}

.prose p { max-width: 68ch; color: var(--ink-80); margin-bottom: 1.1em; }
.prose h2 { font-size: clamp(28px, 3vw, 40px); margin: 2.4em 0 0.6em; }
.prose h3 { font-size: clamp(20px, 2vw, 26px); margin: 1.8em 0 0.4em; font-family: var(--f-display); font-weight: 500; }
.prose ul, .prose ol { margin: 0 0 1.1em 1.4em; color: var(--ink-80); }
.prose li { margin-bottom: 0.35em; max-width: 68ch; }
.prose a { color: var(--bronze-70); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ============================================================
   LAYOUT
   ============================================================ */

.shell {
  position: relative;
  z-index: 3;
}

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.rule {
  border: 0;
  border-top: 1px solid var(--stone-20);
  margin: 0;
}
.rule-dark { border-top-color: rgba(250, 246, 239, 0.14); }

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 22px 0;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  background: rgba(243, 236, 223, 0.72);
  border-bottom: 1px solid rgba(185, 168, 144, 0.25);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-90);
}
.brand .glyph {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 30px;
  font-weight: 500;
  color: var(--bronze-50);
  line-height: 1;
}
.brand .name {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-60);
  text-decoration: none;
  transition: color 200ms;
}
.nav-links a:hover { color: var(--bronze-70); }
.nav-links .index-num {
  color: var(--stone-30);
  margin-right: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink-90);
  background: var(--ink-90);
  color: var(--stone-05);
  cursor: pointer;
  transition: all 300ms var(--ease-classical);
  position: relative;
  overflow: hidden;
}
.btn:hover {
  background: var(--bronze-70);
  border-color: var(--bronze-70);
  color: var(--stone-00);
}
.btn .arrow {
  transition: transform 300ms var(--ease-classical);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink-90);
}
.btn-ghost:hover {
  background: var(--ink-90);
  color: var(--stone-05);
  border-color: var(--ink-90);
}

/* ============================================================
   ARCHES — signature visual device
   ============================================================ */

.arch {
  position: relative;
  border-top-left-radius: 50% 40%;
  border-top-right-radius: 50% 40%;
  overflow: hidden;
}
.arch-frame {
  background: var(--stone-10);
  border: 1px solid var(--stone-20);
}

/* Plaster placeholder inside an arch */
.plaster-fill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(220, 180, 122, 0.38), transparent 60%),
    radial-gradient(ellipse 60% 50% at 30% 90%, rgba(122, 107, 85, 0.25), transparent 70%),
    linear-gradient(160deg, var(--stone-10) 0%, var(--stone-20) 100%);
}
.plaster-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.6;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.37  0 0 0 0 0.28  0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Fluted column — vertical lines motif */
.fluting {
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 11px,
    rgba(122, 107, 85, 0.12) 11px,
    rgba(122, 107, 85, 0.12) 12px
  );
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */

/* Reveal — iframe timelines can stall transitions, so we just snap content visible.
   The gallery light, stat counters, and architecture carry the dynamism. */
.js-reveal .reveal,
.js-reveal .arch-reveal { opacity: 1; }

/* ============================================================
   DARK SECTION (CTA / footer)
   ============================================================ */

.section-dark {
  background: var(--ink-90);
  color: var(--stone-05);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(200, 155, 85, 0.18), transparent 65%),
    radial-gradient(ellipse 50% 40% at 15% 10%, rgba(179, 125, 62, 0.10), transparent 70%);
  pointer-events: none;
}
.section-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='11'/><feColorMatrix values='0 0 0 0 0.8  0 0 0 0 0.6  0 0 0 0 0.3  0 0 0 0.22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--stone-00); }
.section-dark .eyebrow { color: var(--bronze-30); }
.section-dark .lede { color: var(--stone-10); }
.section-dark .btn {
  background: var(--stone-05);
  color: var(--ink-90);
  border-color: var(--stone-05);
}
.section-dark .btn:hover {
  background: var(--bronze-40);
  border-color: var(--bronze-40);
  color: var(--ink-90);
}

/* ============================================================
   MOBILE NAV
   ============================================================ */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--stone-30);
  border-radius: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: border-color 200ms;
}
.nav-toggle:hover { border-color: var(--bronze-70); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink-80);
  transition: transform 300ms var(--ease-classical), opacity 200ms;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--page-pad) 24px;
    background: rgba(243, 236, 223, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--stone-20);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--stone-20);
    font-size: 12px;
  }
  .nav-links a:last-child { border-bottom: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  html { font-size: 16px; }
}
