/* ============================================================
   Ken Cameron — Two Doors
   Warm editorial: cream paper, ink text, two doorways of color.
   Single-viewport hero: everything fits in 100svh on desktop.
   ============================================================ */

:root {
  --paper: #f7f1e5;
  --paper-deep: #efe6d3;
  --ink: #221d15;
  --ink-soft: #55492f;

  --nfp: #33604a;        /* moss green — NFP Labs */
  --nfp-glow: #dce8d8;
  --tlc: #7c2d26;        /* oxblood — Transform */
  --tlc-glow: #f2ddd2;

  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --body: "Newsreader", Georgia, serif;
  --ui: "Instrument Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, #fffdf6 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  height: 100svh;
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vh, 2.5rem) clamp(1.25rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
}

/* ---------- Intro ---------- */

.intro {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
  flex: 0 0 auto;
}

.monogram {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-block;
  padding: 0.45em 1em 0.4em 1.3em;
  margin: 0 0 clamp(0.75rem, 2vh, 1.5rem);
  animation: rise 0.7s ease-out both;
}

.intro-headline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.1vw + 1.4vh, 2.2rem);
  line-height: 1.2;
  margin: 0 0 clamp(0.6rem, 1.8vh, 1.1rem);
  text-wrap: balance;
  animation: rise 0.7s ease-out 0.1s both;
}

.intro-headline em {
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  color: var(--tlc);
  white-space: nowrap;
}

.intro-note {
  font-size: clamp(0.95rem, 0.8vw + 0.9vh, 1.15rem);
  color: var(--ink-soft);
  animation: rise 0.7s ease-out 0.2s both;
}

.intro-note p { margin: 0 0 0.5em; }
.intro-note p:last-child { margin-bottom: 0; }

.rule {
  margin: clamp(0.9rem, 2.2vh, 1.75rem) auto 0;
  display: flex;
  justify-content: center;
  animation: rise 0.7s ease-out 0.3s both;
}

.rule span {
  width: 4.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--nfp) 0 50%, var(--tlc) 50% 100%);
  border-radius: 2px;
}

/* ---------- Doors ---------- */

.doors {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(0.9rem, 2.2vh, 1.75rem);
}

.door {
  --accent: var(--ink);
  --glow: var(--paper-deep);
  display: block;
  min-height: 0;
  text-decoration: none;
  color: var(--ink);
  border: 1.5px solid var(--accent);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, var(--glow) 0%, var(--paper) 60%);
  padding: clamp(1.1rem, 2.6vh, 2rem) clamp(1.25rem, 2.5vw, 2.25rem);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  animation: rise 0.8s ease-out both;
}

.door--nfp { --accent: var(--nfp); --glow: var(--nfp-glow); animation-delay: 0.35s; }
.door--tlc { --accent: var(--tlc); --glow: var(--tlc-glow); animation-delay: 0.45s; }

/* the light behind the door */
.door::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* inset panel line — reads as a paneled door, not a headstone */
.door::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 0.55rem;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

.door:hover,
.door:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -18px color-mix(in srgb, var(--accent) 55%, transparent);
}

.door:hover::before,
.door:focus-visible::before {
  transform: translateY(0);
}

.door:hover::after,
.door:focus-visible::after {
  border-color: color-mix(in srgb, var(--paper) 45%, transparent);
}

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

.door-frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(0.5rem, 1.4vh, 1rem);
  height: 100%;
  transition: color 0.3s ease;
}

.door:hover .door-frame,
.door:focus-visible .door-frame {
  color: var(--paper);
}

.door-eyebrow {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.3s ease;
}

.door:hover .door-eyebrow,
.door:focus-visible .door-eyebrow {
  color: color-mix(in srgb, var(--paper) 75%, var(--accent));
}

.door-name {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.6vw + 1.4vh, 2.3rem);
  line-height: 1.05;
}

.door-copy {
  font-size: clamp(0.88rem, 0.5vw + 0.8vh, 1rem);
  line-height: 1.55;
  max-width: 34ch;
  color: var(--ink-soft);
  transition: color 0.3s ease;
}

.door:hover .door-copy,
.door:focus-visible .door-copy {
  color: color-mix(in srgb, var(--paper) 88%, var(--accent));
}

.door-go {
  margin-top: clamp(0.35rem, 1vh, 0.75rem);
  font-family: var(--ui);
  font-weight: 600;
  font-size: clamp(0.95rem, 0.45vw + 0.9vh, 1.1rem);
  letter-spacing: 0.02em;
  background: var(--accent);
  color: var(--paper);
  border-radius: 999px;
  padding: 0.8em 1.7em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  gap: 0.55rem;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: background 0.3s ease, color 0.3s ease;
}

.door:hover .door-go,
.door:focus-visible .door-go {
  background: var(--paper);
  color: var(--accent);
}

.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.door:hover .arrow,
.door:focus-visible .arrow {
  transform: translateX(6px);
}

/* ---------- Footer ---------- */

.footer {
  flex: 0 0 auto;
  margin-top: clamp(0.75rem, 2vh, 1.5rem);
  text-align: center;
  font-size: clamp(0.9rem, 0.5vw + 0.8vh, 1.05rem);
  color: var(--ink-soft);
  animation: rise 0.8s ease-out 0.55s both;
}

.footer p { margin: 0; }

.footer em {
  font-style: italic;
  color: var(--ink);
}

/* ---------- Motion & layout guards ---------- */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Small screens: let the page scroll and stack the doors —
   cramming both into one short viewport helps no one. */
@media (max-width: 44rem) {
  .page { height: auto; min-height: 100svh; }
  .doors { grid-template-columns: 1fr; }
  .door { min-height: 55svh; }
  .door-copy { max-width: 36ch; }
}
