/* ==========================================================================
   Team AI Chess — Design tokens
   Palette drawn from an old wooden chess set: cream & walnut board squares,
   maroon club felt, tarnished gold inlay.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  /* colors */
  --cream:      #f4eedb;
  --parchment:  #eae0c7;
  --parchment-2:#e2d5b3;
  --walnut:     #6f4e37;
  --walnut-dark:#513826;
  --espresso:   #2a1f16;
  --maroon:     #7a2e2e;
  --maroon-dark:#5c2222;
  --gold:       #a9822c;
  --gold-light: #c9a24a;
  --hairline:   #d8cba9;
  --cream-shadow: rgba(42, 31, 22, 0.12);

  /* type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Spectral', 'Georgia', serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* layout */
  --max-width: 1160px;
  --section-pad: clamp(3.5rem, 8vw, 7rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--espresso);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--maroon);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--maroon);
  display: inline-block;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--hairline);
  background: rgba(244, 238, 219, 0.9);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  gap: 1.5rem;
}

.site-header .logo-group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-header img {
  width: auto;
  display: block;
  filter: grayscale(15%);
}

.logo-temple {
  height: 58px;
}

.logo-nedc {
  height: 72px;
}

.site-header .divider {
  width: 1px;
  height: 28px;
  background: var(--hairline);
}

.site-header .header-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--walnut);
  text-align: right;
  line-height: 1.4;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(4.5rem, 10vw, 7rem);
  padding-bottom: clamp(5rem, 11vw, 8rem);
  background:
    linear-gradient(180deg, rgba(244,238,219,0) 60%, var(--cream) 100%),
    repeating-linear-gradient(0deg, var(--parchment) 0px, var(--parchment) 64px, var(--parchment-2) 64px, var(--parchment-2) 128px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 64px, rgba(42,31,22,0.045) 64px, rgba(42,31,22,0.045) 128px);
  border-bottom: 1px solid var(--hairline);
}

.hero-pieces {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-piece {
  position: absolute;
  font-family: var(--font-display);
  color: var(--walnut);
  opacity: 0.16;
  will-change: transform;
  animation: drift linear infinite;
  user-select: none;
}

.hero-piece.gold { color: var(--gold); opacity: 0.14; }

@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(var(--dx), var(--dy)) rotate(var(--dr)); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-content .eyebrow {
  justify-content: center;
}
.hero-content .eyebrow::before { display: none; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-top: 1.1rem;
  line-height: 1.02;
}

.hero .subhead {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--walnut-dark);
  margin-top: 0.9rem;
}

.hero .description {
  margin: 1.6rem auto 0;
  max-width: 540px;
  font-size: 1.06rem;
  color: var(--espresso);
  opacity: 0.88;
}

.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* buttons */
.btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: var(--maroon);
  color: var(--cream);
  box-shadow: 0 2px 0 var(--maroon-dark);
}
.btn-primary:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--espresso);
}

.btn-secondary {
  background: transparent;
  color: var(--walnut-dark);
  border-color: var(--walnut-dark);
}
.btn-secondary:hover {
  background: var(--walnut-dark);
  color: var(--cream);
  transform: translateY(-1px);
}

/* ==========================================================================
   Section shared
   ========================================================================== */

section.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
  border-bottom: 1px solid var(--hairline);
}

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

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-top: 0.7rem;
}

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

/* ==========================================================================
   Watch the Demo (video)
   ========================================================================== */

.video-frame {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--hairline);
  padding: 0.6rem;
  background: var(--cream);
  box-shadow: 0 1px 0 var(--hairline), 0 10px 24px -18px rgba(42, 31, 22, 0.4);
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--espresso);
}

/* ==========================================================================
   Why It's Important — photo gallery
   ========================================================================== */

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

@media (max-width: 760px) {
  .work-gallery { grid-template-columns: 1fr; }
}

.work-gallery figure {
  margin: 0;
  border: 1px solid var(--hairline);
  background: var(--cream);
  padding: 0.5rem 0.5rem 0.9rem;
}

.work-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: sepia(12%) saturate(92%);
  margin-bottom: 0.7rem;
}

.work-gallery figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--walnut-dark);
  text-align: center;
}

/* ==========================================================================
   Meet the Team
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

@media (max-width: 980px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; }
}

.advisor-label {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.advisor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .advisor-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .advisor-grid { grid-template-columns: 1fr; }
}

.team-card {
  background: var(--cream);
  border: 1px solid var(--hairline);
  padding: 1.1rem 1.1rem 1.4rem;
  text-align: left;
  position: relative;
}

.team-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}

.team-card .frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--parchment-2);
  margin-bottom: 1rem;
  position: relative;
}

.team-card .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(12%) saturate(92%);
}

.team-card .piece-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--walnut);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--walnut-dark);
  box-shadow: 0 1px 4px rgba(42,31,22,0.25);
}

.team-card .frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(42,31,22,0.06);
}

.team-card .position {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 0.5rem;
  display: block;
}

.team-card .major {
  font-size: 1.05rem;
  color: var(--walnut-dark);
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.team-card .linkedin {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--espresso);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  border-bottom: 1px solid var(--walnut);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.team-card .linkedin:hover {
  color: var(--maroon);
  border-color: var(--maroon);
}

/* ==========================================================================
   Why It's Important
   ========================================================================== */

.importance-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .importance-layout { grid-template-columns: 1fr; }
}

.importance-copy p {
  margin: 0 0 1.1rem;
  color: var(--espresso);
}

.pull-quote {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--maroon);
  padding: 2rem 2rem 1.75rem;
  position: relative;
  align-self: start;
}

.pull-quote .mark {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--maroon);
  line-height: 1;
  display: block;
  margin-bottom: -0.4rem;
  opacity: 0.55;
}

.pull-quote p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--espresso);
  margin: 0 0 1rem;
}

.pull-quote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--walnut);
}

/* ==========================================================================
   How It Works
   ========================================================================== */

.process-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
}

.process-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.75rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--hairline);
}

@media (max-width: 640px) {
  .process-item { grid-template-columns: 56px 1fr; }
}

.process-item .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
}

.process-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.process-item p {
  margin: 0;
  color: var(--espresso);
  opacity: 0.88;
  max-width: 620px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--espresso);
  color: var(--parchment);
  padding: 2.5rem 0;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* focus visibility for keyboard nav */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
}
