/* ============================================
   SIX TABLE CONSULTING
   Editorial, type-led, refined.
   ============================================ */

:root {
  --bg: #0c111c;
  --bg-deep: #070a12;
  --cream: #f5efe4;
  --cream-soft: #e8e0d0;
  --cream-dim: rgba(245, 239, 228, 0.6);
  --cream-faint: rgba(245, 239, 228, 0.4);
  --gold: #b8946a;
  --gold-bright: #cda680;
  --gold-dim: rgba(184, 148, 106, 0.4);
  --line: rgba(245, 239, 228, 0.1);
  --line-strong: rgba(245, 239, 228, 0.2);
  --card-bg: rgba(245, 239, 228, 0.02);
  --card-bg-hover: rgba(245, 239, 228, 0.035);
  --btn-primary-bg: var(--cream);
  --btn-primary-text: var(--bg-deep);
  --grain-color: 0.96 0.94 0.89;
  --grain-opacity: 0.07;
  --grain-blend: overlay;
  --mark-swap: 1;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5efe4;
    --bg-deep: #ebe4d4;
    --cream: #1a1f2e;
    --cream-soft: #2a3142;
    --cream-dim: rgba(26, 31, 46, 0.7);
    --cream-faint: rgba(26, 31, 46, 0.45);
    --gold: #8a6d4f;
    --gold-bright: #6f5640;
    --gold-dim: rgba(138, 109, 79, 0.4);
    --line: rgba(26, 31, 46, 0.1);
    --line-strong: rgba(26, 31, 46, 0.18);
    --card-bg: rgba(26, 31, 46, 0.02);
    --card-bg-hover: rgba(26, 31, 46, 0.04);
    --btn-primary-bg: #1a1f2e;
    --btn-primary-text: #f5efe4;
    --grain-color: 0.15 0.18 0.25;
    --grain-opacity: 0.05;
    --grain-blend: multiply;
    --mark-swap: 0;
  }
}

:root {
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--bg-deep);
}

/* ============================================
   ATMOSPHERIC LAYERS
   ============================================ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.94 0 0 0 0 0.89 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

@media (prefers-color-scheme: light) {
  .grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.18 0 0 0 0 0.25 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
    opacity: 0.5;
  }
}

.glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}

.glow-top {
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(184, 148, 106, 0.25), transparent 70%);
}

.glow-bottom {
  bottom: -400px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(184, 148, 106, 0.12), transparent 70%);
}

@media (prefers-color-scheme: light) {
  .glow {
    opacity: 0.4;
  }
  .glow-top {
    background: radial-gradient(ellipse, rgba(184, 148, 106, 0.35), transparent 70%);
  }
  .glow-bottom {
    background: radial-gradient(circle, rgba(184, 148, 106, 0.2), transparent 70%);
  }
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 3rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.brand-mark-light {
  display: none;
}

@media (prefers-color-scheme: light) {
  .brand-mark-dark {
    display: none;
  }
  .brand-mark-light {
    display: block;
  }
}

.brand:hover .brand-mark {
  opacity: 0.85;
}

.brand-text {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--cream);
  transition: color 0.3s ease;
}

.brand:hover .brand-text {
  color: var(--gold-bright);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-links a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cream-dim);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--cream);
}

.nav-links a.active {
  color: var(--cream);
}

.nav-links a:not(.nav-cta).active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cream) !important;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gold);
  transition: gap 0.3s ease, color 0.3s ease;
}

.nav-cta:hover {
  gap: 0.85rem;
  color: var(--gold-bright) !important;
}

.nav-cta .arrow {
  transition: transform 0.3s ease;
}

.nav-cta:hover .arrow {
  transform: translateX(2px);
}

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

main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
}

section {
  padding: 7rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: none;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
  max-width: 900px;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--cream-soft);
  margin-bottom: 3rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  animation: rise 1s ease-out 0.1s both;
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--gold);
  animation: pulse 2.5s ease-in-out infinite;
}

h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.8rem, 7.5vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
  font-variation-settings: "opsz" 144;
}

h1 .line {
  display: block;
  animation: rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1 .line:nth-child(1) { animation-delay: 0.2s; }
h1 .line:nth-child(2) { animation-delay: 0.4s; }

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.lede {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--cream-dim);
  max-width: 56ch;
  margin-bottom: 3rem;
  font-weight: 300;
  animation: rise 1s ease-out 0.6s both;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  animation: rise 1s ease-out 0.8s both;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.6rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--btn-primary-text);
  transform: translateY(-1px);
}

.btn-primary .arrow {
  transition: transform 0.3s ease;
}

.btn-primary:hover .arrow {
  transform: translateX(3px);
}

.btn-primary.big {
  padding: 1.2rem 2rem;
  font-size: 0.9rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  color: var(--cream-soft);
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 400;
  padding: 1rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 0.6rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--cream-faint);
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform 0.4s ease, background 0.3s ease;
}

.btn-ghost:hover {
  color: var(--cream);
}

.btn-ghost:hover::after {
  transform: scaleX(1);
  background: var(--gold);
}

/* ============================================
   SECTION LABELS
   ============================================ */

.section-label {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--cream-soft);
}

.section-label .num {
  font-family: var(--display);
  font-size: 1rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
  max-width: 280px;
}

/* ============================================
   PRINCIPLES GRID
   ============================================ */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.principle {
  padding: 0 2.5rem;
  position: relative;
}

.principle:first-child {
  padding-left: 0;
}

.principle:last-child {
  padding-right: 0;
}

.principle:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.principle h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.principle p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--cream-dim);
  font-weight: 300;
}

/* ============================================
   CTA
   ============================================ */

.cta {
  text-align: left;
  padding-bottom: 9rem;
}

.cta h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  font-style: italic;
  color: var(--cream);
}

.cta-lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--cream-dim);
  max-width: 52ch;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--cream-faint);
}

/* ============================================
   PAGE HERO (for subpages)
   ============================================ */

.page-hero {
  padding-top: 7rem;
  padding-bottom: 5rem;
  max-width: 900px;
  border-bottom: 1px solid var(--line);
}

.page-hero .lede {
  margin-bottom: 0;
}

/* ============================================
   SPLIT (two-card section on home)
   ============================================ */

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.split-card {
  display: block;
  padding: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.split-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(184, 148, 106, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.split-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.split-card:hover::before {
  opacity: 1;
}

.split-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.split-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.split-card .arrow {
  color: var(--cream-dim);
  transition: transform 0.3s ease, color 0.3s ease;
}

.split-card:hover .arrow {
  transform: translateX(4px);
  color: var(--gold);
}

.split-card h3 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 1.2rem;
  line-height: 1.1;
  position: relative;
}

.split-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cream-dim);
  position: relative;
}

/* ============================================
   FEATURES (numbered list for subpages)
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem 5rem;
}

.feature {
  position: relative;
}

.feature-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.feature h3 {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.feature p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cream-dim);
  font-weight: 300;
}

/* ============================================
   QUOTE BLOCK
   ============================================ */

.quote-block {
  border-bottom: 1px solid var(--line);
}

.quote-block blockquote {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  color: var(--cream);
  letter-spacing: -0.01em;
  max-width: 30ch;
  margin-bottom: 2rem;
}

.quote-block blockquote::before {
  content: '"';
  display: block;
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.quote-attribution {
  font-size: 0.85rem;
  color: var(--cream-faint);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ============================================
   PROSE BLOCK (for about page)
   ============================================ */

.prose-block {
  border-bottom: 1px solid var(--line);
}

.prose {
  max-width: 64ch;
}

.prose p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--cream-soft);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  color: var(--gold);
  font-size: 1.2rem;
}

/* ============================================
   CONTACT CARDS
   ============================================ */

.contact-options {
  border-bottom: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-card {
  display: block;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  background: var(--card-bg-hover);
}

.contact-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.contact-card .arrow {
  color: var(--cream-dim);
  transition: transform 0.3s ease, color 0.3s ease;
  font-size: 0.95rem;
}

.contact-card:hover .arrow {
  transform: translateX(4px);
  color: var(--gold);
}

.contact-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.contact-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--cream-dim);
}

.cta h2 em {
  font-style: italic;
  color: var(--gold);
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 14px var(--gold);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
    box-shadow: 0 0 6px var(--gold);
  }
}

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

@media (max-width: 900px) {
  .principles-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .principle {
    padding: 2rem 0;
    border-bottom: 1px solid var(--line);
  }

  .principle:first-child {
    padding-top: 0;
  }

  .principle:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .principle:not(:last-child)::after {
    display: none;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 1.3rem;
  }
}

@media (max-width: 700px) {
  .nav {
    padding: 1.25rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0.9rem;
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }

  .nav-links a {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
  }

  .nav-cta {
    margin-left: auto;
    padding: 0.4rem 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  main {
    padding: 0 1.5rem;
  }

  section {
    padding: 4.5rem 0;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero-meta {
    font-size: 0.65rem;
    margin-bottom: 2rem;
  }

  .lede {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .btn-primary, .btn-ghost {
    text-align: center;
    justify-content: center;
  }

  .big-logo, .hero-logo-img {
    width: 240px;
  }

  .section-label {
    margin-bottom: 2.5rem;
  }

  footer {
    padding: 1.5rem;
  }

  .footer-row {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.6rem;
  }

  .cta h2 {
    font-size: 2.4rem;
  }

  .principle h3 {
    font-size: 1.35rem;
  }

  .btn-primary.big {
    font-size: 0.78rem;
    padding: 1.1rem 1.5rem;
  }
}
