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

/* ── Variables ── */
:root {
  --parchment:   #f5f0e8;
  --cream:       #ede8dc;
  --warm-white:  #faf8f4;
  --sand:        #d8d0bc;
  --stone:       #b8b0a0;
  --mid:         #7a7268;
  --charcoal:    #3a3530;
  --ink:         #1e1a16;
  --ember:       #c84b1a;
  --ember-light: #e8602a;
  --ember-pale:  #f5e8e2;
  --gold:        #a07820;
  --gold-pale:   #f5eed8;
  --section-alt: #eee9df;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --nav-h: 72px;
  --max-w: 1200px;
  --gutter: clamp(24px, 5vw, 80px);

  --shadow-sm: 0 2px 12px rgba(30,26,22,0.08);
  --shadow-md: 0 8px 32px rgba(30,26,22,0.12);
  --shadow-lg: 0 24px 64px rgba(30,26,22,0.16);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: var(--font-ui);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(250,248,244,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sand);
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav-logo span { color: var(--ember); }
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta {
  color: var(--ember);
  border: 1.5px solid var(--ember);
  padding: 8px 20px;
  transition: background 0.2s, color 0.2s;
}
.nav-links .nav-cta:hover {
  background: var(--ember);
  color: white;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--charcoal);
  transition: all 0.3s;
}

/* ── Video Hero ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 80px) var(--gutter) 80px;
  overflow: hidden;
}
.video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20,16,12,0.55) 0%,
    rgba(20,16,12,0.35) 40%,
    rgba(20,16,12,0.72) 100%
  );
  z-index: 1;
}
/* Software layer UI suggestion */
.video-ui-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.ui-panel {
  position: absolute;
  background: rgba(245,240,232,0.08);
  border: 1px solid rgba(245,240,232,0.15);
  backdrop-filter: blur(2px);
  border-radius: 2px;
  padding: 12px 16px;
}
.ui-panel-1 {
  top: 22%;
  right: 8%;
  width: 220px;
  animation: floatPanel 6s ease-in-out infinite;
}
.ui-panel-2 {
  top: 45%;
  right: 14%;
  width: 180px;
  animation: floatPanel 8s ease-in-out infinite 1s;
}
.ui-panel-3 {
  top: 30%;
  right: 4%;
  width: 140px;
  animation: floatPanel 7s ease-in-out infinite 2s;
}
@keyframes floatPanel {
  0%, 100% { transform: translateY(0px); opacity: 0.7; }
  50% { transform: translateY(-6px); opacity: 1; }
}
.ui-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(200,75,26,0.9);
  margin-bottom: 6px;
}
.ui-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(245,240,232,0.9);
  font-weight: 400;
}
.ui-bar {
  height: 2px;
  background: rgba(245,240,232,0.15);
  margin-top: 8px;
  border-radius: 1px;
  overflow: hidden;
}
.ui-bar-fill {
  height: 100%;
  background: var(--ember);
  border-radius: 1px;
  animation: barFill 3s ease-in-out infinite;
}
@keyframes barFill {
  0% { width: 40%; }
  50% { width: 78%; }
  100% { width: 40%; }
}
.ui-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.ui-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(245,240,232,0.3);
}
.ui-dot.active { background: var(--ember); }

/* Hero content */
.hero-content { position: relative; z-index: 3; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(245,240,232,0.75);
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--ember);
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--warm-white);
  max-width: 820px;
}
.hero-headline em {
  font-style: italic;
  color: #e87a50;
}
.hero-sub {
  margin-top: 32px;
  font-size: 1.05rem;
  color: rgba(245,240,232,0.75);
  max-width: 480px;
  line-height: 1.75;
}
.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ember);
  color: white;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(200,75,26,0.3);
}
.btn-primary:hover {
  background: var(--ember-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200,75,26,0.4);
}
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(245,240,232,0.85);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(245,240,232,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost-light:hover {
  color: white;
  border-color: white;
}
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--charcoal);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--sand);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost-dark:hover {
  color: var(--ember);
  border-color: var(--ember);
}

/* Hero stats bar */
.hero-stats {
  position: relative;
  z-index: 3;
  margin-top: 64px;
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(245,240,232,0.15);
  padding-top: 40px;
  flex-wrap: wrap;
}
.hero-stat {
  padding-right: 48px;
  margin-right: 48px;
  border-right: 1px solid rgba(245,240,232,0.15);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 300;
  color: white;
  line-height: 1;
}
.hero-stat-num sup {
  font-size: 1.2rem;
  vertical-align: super;
  color: #e87a50;
}
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.5);
  margin-top: 6px;
}

/* ── Shared section ── */
section { padding: 112px var(--gutter); position: relative; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ember);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--ink);
  max-width: 640px;
}
.section-title em { font-style: italic; color: var(--ember); }
.divider {
  width: 100%;
  height: 1px;
  background: var(--sand);
}

/* ── Thesis ── */
#thesis { background: var(--warm-white); }
.thesis-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 56px;
  align-items: start;
}
.thesis-body {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--charcoal);
}
.thesis-body strong { font-weight: 500; color: var(--ink); }
.thesis-pillars { display: flex; flex-direction: column; }
.pillar {
  padding: 24px 0;
  border-bottom: 1px solid var(--sand);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
}
.pillar:first-child { border-top: 1px solid var(--sand); }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ember);
  letter-spacing: 0.1em;
  padding-top: 3px;
}
.pillar-title {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 5px;
}
.pillar-desc { font-size: 0.875rem; color: var(--mid); line-height: 1.65; }

/* ── Video Feature Section ── */
#supply-chain-video {
  padding: 0;
  position: relative;
  height: 480px;
  overflow: hidden;
}
#supply-chain-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scv-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(20,16,12,0.82) 0%,
    rgba(20,16,12,0.5) 50%,
    rgba(20,16,12,0.2) 100%
  );
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
}
.scv-content { max-width: 520px; }
.scv-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
}
.scv-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  color: white;
  line-height: 1.2;
  margin-bottom: 16px;
}
.scv-headline em { font-style: italic; color: #e87a50; }
.scv-body { font-size: 0.9rem; color: rgba(245,240,232,0.75); line-height: 1.7; }

/* ── Edge ── */
#edge { background: var(--section-alt); }
.edge-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.edge-card {
  background: var(--warm-white);
  padding: 40px 36px;
  border: 1px solid var(--sand);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: var(--shadow-sm);
}
.edge-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--ember), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.edge-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.edge-card:hover::after { transform: scaleX(1); }
.edge-icon {
  width: 44px;
  height: 44px;
  background: var(--ember-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.1rem;
}
.edge-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
}
.edge-desc { font-size: 0.875rem; color: var(--mid); line-height: 1.7; }
.edge-num {
  position: absolute;
  bottom: 20px; right: 28px;
  font-family: var(--font-mono);
  font-size: 3rem;
  color: rgba(30,26,22,0.04);
  pointer-events: none;
  line-height: 1;
}

/* ── Portfolio ── */
#portfolio { background: var(--warm-white); }
.portfolio-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 56px;
  align-items: end;
  margin-bottom: 48px;
}
.portfolio-desc { font-size: 0.925rem; color: var(--mid); line-height: 1.8; }
.criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.criteria-item::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--ember);
  flex-shrink: 0;
  margin-top: 7px;
  border-radius: 50%;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.portfolio-card {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  padding: 36px 32px;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: var(--shadow-sm);
}
.portfolio-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.portfolio-card.featured {
  border-top: 3px solid var(--ember);
  background: var(--warm-white);
}
.portfolio-card.placeholder { opacity: 0.55; }
.portfolio-card.placeholder:hover { opacity: 0.75; }
.port-logo {
  width: 40px; height: 40px;
  background: var(--section-alt);
  border: 1px solid var(--sand);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.port-logo-featured {
  background: var(--ember-pale);
  border-color: rgba(200,75,26,0.2);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ember);
}
.port-logo-inner {
  width: 18px; height: 18px;
  background: var(--stone);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.port-name {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 6px;
}
.port-desc {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}
.port-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
  border: 1px solid rgba(200,75,26,0.3);
  padding: 3px 8px;
  background: var(--ember-pale);
}
.port-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 8px;
}
.portfolio-cta {
  margin-top: 48px;
  padding: 48px;
  background: var(--section-alt);
  border: 1px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.portfolio-cta-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--ink);
  max-width: 480px;
  line-height: 1.4;
}
.portfolio-cta-text em { font-style: italic; color: var(--ember); }

/* ── Team ── */
#team { background: var(--section-alt); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.team-card {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  padding: 44px;
  box-shadow: var(--shadow-sm);
}
.team-avatar {
  width: 60px; height: 60px;
  margin-bottom: 20px;
  overflow: hidden;
}
.team-avatar-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--ember-pale), var(--section-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ember);
  font-weight: 400;
}
.team-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
}
.team-role {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 18px;
}
.team-bio { font-size: 0.875rem; color: var(--mid); line-height: 1.75; }

/* ── Contact ── */
#contact { background: var(--warm-white); }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 56px;
}
.contact-block-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 6px;
}
.contact-block-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--charcoal);
  transition: color 0.2s;
}
a.contact-block-val:hover { color: var(--ember); }
.contact-info-blocks { display: flex; flex-direction: column; gap: 32px; }
.what-we-seek {
  padding: 28px 32px;
  background: var(--section-alt);
  border: 1px solid var(--sand);
  border-left: 3px solid var(--ember);
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
}
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--warm-white);
  border: 1.5px solid var(--sand);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--stone); }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--ember); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.75rem; color: var(--stone); line-height: 1.6; }

/* ── Footer ── */
footer {
  background: var(--ink);
  padding: 48px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
}
.footer-logo span { color: var(--ember); }
.footer-links { display: flex; gap: 32px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cream); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--mid);
  letter-spacing: 0.08em;
}

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--warm-white);
    padding: 32px var(--gutter);
    gap: 24px;
    border-bottom: 1px solid var(--sand);
    box-shadow: var(--shadow-md);
  }
  .thesis-layout,
  .portfolio-intro,
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .edge-layout { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .portfolio-cta { flex-direction: column; align-items: flex-start; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .hero-stat { border-right: none; padding-right: 0; margin-right: 0; }
  .ui-panel { display: none; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
