:root {
  --wall: #E8EEF1;
  --ink: #16213E;
  --muted: #4B5877;
  --cobalt: #2B4BD6;
  --marigold: #F2B01E;
  --leaf: #1F6F4A;
  --plum: #A8326F;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
ul { list-style: none; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 64px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--cobalt);
}
.brand span { color: var(--ink); }

.top-link {
  font-weight: 500;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Intro */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  padding: clamp(32px, 6vw, 88px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 72px);
}

.intro h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 11ch;
}

.intro p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 46ch;
  padding-bottom: 6px;
}

/* Stage: the row of doors on a threshold, under a scalloped trim */
.stage {
  position: relative;
  margin: 0 clamp(20px, 5vw, 64px);
  padding: 44px clamp(14px, 2.4vw, 32px) 0;
  border-bottom: 8px solid var(--ink);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 16px;
  background:
    radial-gradient(circle 12px at 12px 0, transparent 11px, var(--ink) 12.5px) 0 0 / 24px 16px repeat-x;
}

.doors {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  align-items: end;
}

.doorway {
  perspective: 1000px;
  background: var(--ink);
  border-radius: 999px 999px 4px 4px;
  display: flex;
}

.door {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: clamp(380px, 38vw, 470px);
  padding: 30px 20px 24px;
  border-radius: 999px 999px 4px 4px;
  text-decoration: none;
  color: #fff;
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(.2, .7, .2, 1);
}

/* inset panel line */
.door::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px 999px 2px 2px;
  pointer-events: none;
}

.door-icon {
  width: 52px;
  height: 52px;
  margin: 14px auto 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.door-name {
  margin-top: auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  padding: 0 6px;
}

.door-desc {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0 6px;
}

.door-cta {
  margin-top: 18px;
  padding: 0 6px 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.door--cobalt   { background: var(--cobalt); }
.door--marigold { background: var(--marigold); color: var(--ink); }
.door--marigold::before { border-color: rgba(22, 33, 62, 0.35); }
.door--leaf     { background: var(--leaf); }
.door--plum     { background: var(--plum); }

/* the door opens on hover or keyboard focus */
@media (hover: hover) {
  .doorway:hover .door { transform: rotateY(-22deg); }
}
.door:focus-visible { transform: rotateY(-22deg); outline-offset: 6px; }

/* not yet open */
.doorway--soon { background: transparent; }
.door--soon {
  background: transparent;
  color: var(--muted);
  border: 2px dashed var(--muted);
  border-bottom: 0;
  cursor: default;
}
.door--soon::before { display: none; }
.door--soon .door-cta { text-decoration: none; font-weight: 500; }

/* Footer */
.foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  padding: 36px clamp(20px, 5vw, 64px) 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { text-underline-offset: 4px; }

/* Tablet: doors wrap */
@media (max-width: 1100px) {
  .doors { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 28px; }
  .doorway { grid-column: span 2; }
  .doorway:nth-child(4) { grid-column: 2 / span 2; }
  .doorway:nth-child(5) { grid-column: 4 / span 2; }
  .door { min-height: 380px; }
}

/* Phone: one door per row */
@media (max-width: 700px) {
  .intro { grid-template-columns: 1fr; align-items: start; }
  .intro h1 { max-width: 12ch; }
  .doors { grid-template-columns: 1fr; row-gap: 20px; }
  .doorway, .doorway:nth-child(4), .doorway:nth-child(5) { grid-column: auto; }
  .door { min-height: 360px; }
  .stage { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .door { transition: none; }
  .doorway:hover .door, .door:focus-visible { transform: none; }
}
