/* =========================================================================
   POD 3B
   Colors come from the University of the Pacific site (pacific.edu/dental).
   Fonts: the Adobe ones the school uses are listed first; the Google
   stand-ins after them are used until the Adobe Fonts kit is added.
   ========================================================================= */

:root {
  /* UOP palette */
  --navy: #161729;
  --orange: #bf4a12;
  --orange-bright: #e65300;
  --gold: #f6b222;
  --green: #2b7050;

  /* the opening's dark orange */
  --ember-1: #c4521a;
  --ember-2: #a33f10;
  --ember-3: #7e2c0b;
  --ember-4: #561c06;

  /* light pages */
  --cream: #fbf6ee;
  --sand: #f1e7d8;
  --line: rgba(22, 23, 41, 0.14);
  --ink: var(--navy);
  --ink-soft: rgba(22, 23, 41, 0.7);
  --on-ember: #fff3e4;
  --on-ember-soft: rgba(255, 243, 228, 0.72);

  --font-display: "neuzeit-grotesk-condensed", "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "neuzeit-grotesk", "Barlow", system-ui, sans-serif;
  --font-accent: "bely-display", "DM Serif Display", Georgia, serif;
  /* Pacific Dental's look: Bely Display headlines, wide all-caps labels */
  --font-serif: "bely-display", "Fraunces", Georgia, serif;
  --serif-weight: 700;      /* Bely Display has one weight: set this to 400 once the Adobe kit is in */
  --font-label: "Montserrat", "Barlow", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ember-3);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(1320px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.dot { opacity: 0.5; padding: 0 0.15em; }

/* ---------- layers ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(110% 85% at 32% 42%, var(--ember-1) 0%, var(--ember-2) 36%, var(--ember-3) 72%, var(--ember-4) 100%);
}
/* a faint drafting grid over the orange */
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 243, 228, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 243, 228, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(90% 80% at 40% 45%, #000 30%, transparent 85%);
}
.skull-canvas {
  position: fixed; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.nav, main, .footer { position: relative; z-index: 3; }

/* =========================================================================
   OPENING
   ========================================================================= */
.intro-back, .intro-front { display: none; }
.intro-on .intro-back, .intro-on .intro-front { display: block; }
.intro-on:not(.is-started), .intro-on:not(.is-started) body { overflow: hidden; }

.intro-back {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  --p: 0;
}
.glyph {
  position: absolute; top: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: min(84vh, 60vw);
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 243, 228, 0.32);
  transform: translateY(-52%);
  transition: transform 1.1s var(--ease-in-out), opacity 0.9s ease;
}
.glyph--3 { right: calc(50% + min(6vh, 2vw)); }
.glyph--b { left: calc(50% + min(6vh, 2vw)); }
/* the letters fill up with deep ember from the bottom as the page loads
   (dark, so the glowing glass skull stays readable on top of them) */
.glyph::after {
  content: attr(data-g);
  position: absolute; inset: 0;
  color: #5a1c05;
  -webkit-text-stroke: 0;
  clip-path: inset(calc((1 - var(--p)) * 100%) 0 0 0);
}
.is-started .glyph--3 { transform: translate(-30vw, -52%); opacity: 0; }
.is-started .glyph--b { transform: translate(30vw, -52%); opacity: 0; }

.intro-front {
  position: fixed; inset: 0; z-index: 6;
  color: var(--on-ember);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: progress;
  transition: opacity 0.6s ease;
}
.intro-ready .intro-front { cursor: none; }
.is-started .intro-front { opacity: 0; pointer-events: none; }
.intro-done .intro-back, .intro-done .intro-front { display: none; }
/* the light pages wait until the opening is over */
.intro-on .section, .intro-on .footer { transition: opacity 0.8s ease 0.6s; }
.intro-on:not(.is-started) .section, .intro-on:not(.is-started) .footer { opacity: 0; }

.intro-lbl { position: absolute; margin: 0; }
.intro-lbl span { opacity: 0.5; }
.intro-lbl--bl { bottom: 40px; left: var(--gutter); max-width: 60vw; }
.intro-lbl--br { bottom: 40px; right: var(--gutter); }
.intro-count b {
  font-family: var(--font-display);
  font-size: 44px; line-height: 0.8; font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: -0.12em;
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}
.intro-bar {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px;
  height: 2px; background: rgba(255, 243, 228, 0.18);
}
.intro-bar span {
  display: block; height: 100%; width: 100%;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

/* the viewfinder around the skull */
.intro-frame {
  position: absolute; left: 50%; top: 50%;
  width: min(62vh, 78vw); height: min(70vh, 88vw);
  transform: translate(-50%, -50%);
}
.brk { position: absolute; width: 18px; height: 18px; border: 0 solid currentColor; opacity: 0.85; }
.brk--tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.brk--tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.brk--bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.brk--br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.intro-frame .brk { animation: blink 1.1s steps(2, jump-none) infinite; }
.intro-ready .intro-frame .brk { animation: none; }
@keyframes blink { 50% { opacity: 0.25; } }

/* "click to start": follows the cursor (JS moves it); centered on touch screens */
.intro-start {
  position: fixed; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 16px 11px 14px;
  border: 0; border-radius: 999px;
  background: var(--on-ember); color: var(--ember-3);
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap;
  opacity: 0; transform: translate3d(var(--x, 50vw), var(--y, 50vh), 0) translate(-50%, -50%) scale(0.6);
  transition: opacity 0.35s ease, scale 0.35s var(--ease-out);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(60, 18, 2, 0.35);
}
.intro-ready .intro-start { opacity: 1; transform: translate3d(var(--x, 50vw), var(--y, 50vh), 0) translate(-50%, -50%) scale(1); }
.intro-start__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange-bright); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.55); opacity: 0.6; } }
@media (hover: none), (pointer: coarse) {
  .intro-start { --x: 50vw !important; --y: calc(100svh - 104px) !important; }
}

/* =========================================================================
   NAV + HERO
   ========================================================================= */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--gutter);
  color: var(--on-ember);
}
.nav__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 26px; letter-spacing: 0.01em; text-decoration: none; line-height: 1;
}
.nav__logo b { color: var(--gold); font-weight: 800; }
.nav__links { display: flex; gap: clamp(14px, 2.6vw, 34px); }
.nav__links a {
  font-family: var(--font-label); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; opacity: 0.85;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease-out), opacity 0.2s;
  padding-bottom: 3px;
}
.nav__links a:hover { opacity: 1; background-size: 100% 1px; }

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: 0 clamp(16px, 3vw, 48px);
  padding: 96px var(--gutter) 72px;
  color: var(--on-ember);
}
.hero__stage {
  position: relative;
  height: min(74vh, 760px);
  touch-action: pan-y;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.hero__stage:active { cursor: grabbing; }
.hud { position: absolute; inset: 0; pointer-events: none; color: var(--on-ember); }
.hero__hint {
  position: absolute; left: 0; right: 0; bottom: -34px; margin: 0;
  text-align: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--on-ember-soft);
}
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-fine { display: none; } .hint-touch { display: inline; } }

.hero__copy { position: relative; max-width: 620px; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(104px, 15.5vw, 252px);
  line-height: 0.8;
  letter-spacing: -0.015em;
  margin: 0 0 22px -0.04em;
}
.hero__title .ln { display: block; overflow: hidden; padding-top: 0.06em; }
.hero__title .ln__in { display: block; }
.hero__title .ln--b { color: var(--gold); }
.hero__class {
  font-family: var(--font-label); font-weight: 800;
  font-size: clamp(14px, 1.3vw, 17px); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__lede { font-family: var(--font-accent); font-style: italic; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; color: var(--on-ember); margin-bottom: 34px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 24px;
  border-radius: 999px;
  font-family: var(--font-label); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), background-color 0.2s, color 0.2s, border-color 0.2s;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn--cream { background: var(--on-ember); color: var(--ember-3); }
.btn--cream:hover { background: #fff; }
.btn--ghost { border-color: rgba(255, 243, 228, 0.55); color: var(--on-ember); }
.btn--ghost:hover { border-color: var(--on-ember); background: rgba(255, 243, 228, 0.08); }
.btn--navy { background: var(--navy); color: var(--cream); }
.btn--navy:hover { background: var(--orange); }

/* hero entrance: hidden while the opening plays, then in, line by line */
.intro-on .nav, .intro-on .hud, .intro-on .hero__hint, .intro-on .reveal-hero {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.9s var(--ease-out);
}
.intro-on .hero__title .ln__in { transform: translateY(105%); transition: transform 1s var(--ease-out); }
.intro-on.is-started .nav,
.intro-on.is-started .hud,
.intro-on.is-started .hero__hint,
.intro-on.is-started .reveal-hero { opacity: 1; transform: none; }
.intro-on.is-started .hero__title .ln__in { transform: none; }
.intro-on.is-started .hero__title .ln:nth-child(1) .ln__in { transition-delay: 0.65s; }
.intro-on.is-started .hero__title .ln:nth-child(2) .ln__in { transition-delay: 0.75s; }
.intro-on.is-started .hero__class { transition-delay: 0.9s; }
.intro-on.is-started .hero__lede { transition-delay: 1s; }
.intro-on.is-started .hero__ctas { transition-delay: 1.1s; }
.intro-on.is-started .nav { transition-delay: 1.15s; }
.intro-on.is-started .hud, .intro-on.is-started .hero__hint { transition-delay: 1.25s; }

/* =========================================================================
   LIGHT PAGES
   ========================================================================= */
.section { background: var(--cream); padding: clamp(88px, 13vw, 180px) 0; }
.section + .section { padding-top: 0; }
/* the first light section after the hero rises over it like a sheet
   (a seasonal section can take that spot; see seasons/) */
.hero + .section, .hero + .section[hidden] + .section { border-radius: 28px 28px 0 0; margin-top: -28px; }

.display {
  font-family: var(--font-serif);
  font-weight: var(--serif-weight);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: clamp(46px, 6.6vw, 104px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: 0.35em;
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--orange); }
.lede { font-size: clamp(20px, 1.8vw, 25px); line-height: 1.45; color: var(--ink); max-width: 30em; }
:where(.section p:not(.eyebrow, .display, .lede)) { color: var(--ink-soft); max-width: 34em; }
.section__title { margin-bottom: clamp(40px, 5vw, 72px); }
.section__head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.section__head--split .display { margin-bottom: 0; }

.link {
  color: var(--orange); font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease-out);
}
.link:hover { background-size: 0 1.5px; background-position: 100% 100%; }
.link--light { color: var(--gold); }

/* photo placeholders: swapped for real photos later */
.ph {
  position: relative; width: 100%; height: 100%;
  border-radius: 6px; overflow: hidden;
  background: var(--ph-bg);
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 14px);
}
.ph__lbl {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.ph--orange { --ph-bg: linear-gradient(160deg, #d0602a, var(--orange) 60%, #9b3a0d); }
.ph--navy { --ph-bg: linear-gradient(160deg, #2a2c4a, var(--navy)); }
.ph--gold { --ph-bg: linear-gradient(160deg, #f8c454, #e09a12); }
.ph--green { --ph-bg: linear-gradient(160deg, #3c8a66, var(--green)); }
.ph--sand { --ph-bg: linear-gradient(160deg, #e3d3bb, #cdb898); }
.ph--sand .ph__lbl { color: rgba(22, 23, 41, 0.55); }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
.about__photo .ph { aspect-ratio: 4 / 5; }
.about__img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 24px 60px rgba(22, 23, 41, 0.18); }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.person__photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden;
  background: var(--ph-bg);
  transition: transform 0.45s var(--ease-out);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person:hover .person__photo { transform: translateY(-6px) rotate(-0.6deg); }
.person__num {
  position: absolute; right: 12px; bottom: -0.12em;
  font-family: var(--font-display); font-weight: 800;
  font-size: 140px; line-height: 1;
  color: rgba(255, 255, 255, 0.16);
}
.person__name { color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 28px; text-transform: uppercase; letter-spacing: 0.01em; margin-top: 14px; line-height: 1; }
.person__line { font-size: 15px; color: var(--ink-soft); margin: 6px 0 0; }

/* ---------- dates ---------- */
.dates { background: var(--gold); padding-top: clamp(80px, 11vw, 150px) !important; }
.dates .display em { color: var(--navy); }
.dates .date__when small { color: rgba(22, 23, 41, 0.7); }
.dates .link { color: var(--navy); }
.dates__list { border-top: 1.5px solid var(--navy); }
.date {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 32px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid rgba(22, 23, 41, 0.22);
}
.date p { margin: 0; }
.date__when { color: var(--ink); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: 0.95; }
.date__when small { display: block; font-family: var(--font-label); font-weight: 800; font-size: 11px; letter-spacing: 0.16em; color: var(--ink-soft); margin-top: 8px; }
.date__what { color: var(--ink); font-family: var(--font-serif); font-weight: var(--serif-weight); font-variation-settings: "SOFT" 100, "WONK" 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
.date__what a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.3s var(--ease-out); }
.date__what a:hover { background-size: 100% 1.5px; }
.date__what a span { font-family: var(--font-body); font-size: 0.7em; opacity: 0.6; }
.dates__more { margin-top: 36px; }

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(120px, 14vw, 210px);
  gap: clamp(12px, 1.6vw, 22px);
}
.g1 { grid-column: 1 / span 7; grid-row: span 3; }
.g2 { grid-column: 8 / span 5; grid-row: span 2; }
.g3 { grid-column: 8 / span 5; grid-row: span 3; }
.g4 { grid-column: 1 / span 4; grid-row: span 2; }
.g5 { grid-column: 5 / span 3; grid-row: span 2; }
.gallery__item .ph { height: 100%; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: var(--cream); padding: clamp(64px, 9vw, 120px) 0 40px; overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.footer__mark {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(140px, 22vw, 320px); line-height: 0.74; margin: 0;
  color: transparent; -webkit-text-stroke: 1.5px rgba(246, 178, 34, 0.75);
}
.footer__info { font-size: 16px; color: rgba(251, 246, 238, 0.72); }
.footer__info p { margin-bottom: 0.8em; }
.footer__name { font-family: var(--font-serif); font-weight: var(--serif-weight); font-variation-settings: "SOFT" 100, "WONK" 0; font-size: 28px; color: var(--cream); }
.footer__small { grid-column: 1 / -1; margin: 32px 0 0; padding-top: 22px; border-top: 1px solid rgba(251, 246, 238, 0.14); font-size: 14px; color: rgba(251, 246, 238, 0.55); }

/* ---------- scroll reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 1s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================================
   SMALLER SCREENS
   ========================================================================= */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 76px; padding-bottom: 96px; gap: 0; }
  .hero__stage { height: min(50svh, 92vw); margin: 0 auto; width: min(100%, 520px); }
  .hero__hint { bottom: -4px; }
  .hero__copy { margin-top: 32px; }
  .hero__title { font-size: clamp(88px, 27vw, 180px); display: flex; gap: 0.18em; }
  .about__grid { grid-template-columns: 1fr; }
  .date { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav { padding-top: 18px; }
  .nav__links { gap: 14px; }
  .nav__links a { font-size: 11px; letter-spacing: 0.1em; }
  .intro-count b { font-size: 34px; }
  .glyph { font-size: 82vw; }
  .glyph--3 { right: calc(50% + 1vw); }
  .glyph--b { left: calc(50% + 1vw); }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .date { padding: 18px 0; gap: 4px; }
  .date__when { font-size: 30px; }
  .date__when small { margin-top: 4px; }
  .date__what { font-size: 20px; }
  .person__name { font-size: 22px; }
  .person__num { font-size: 96px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 42vw; }
  .g1 { grid-column: 1 / -1; grid-row: span 2; }
  .g2, .g3, .g4, .g5 { grid-column: auto; grid-row: span 1; }
  .g5 { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1fr; }
}

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