/* =============================================================
   Local Hero — About page (about.html)
   Modules: scroll-progress, reveal, odometer, typewriter,
   zoom-parallax (on workstation photo), cursor-reveal (on Dublin
   band), spotlight-border (on contact form). Tokens from
   _styles.css.
   ============================================================= */

/* ===== SHARED SHELL (also in _index.css; safe to re-declare) === */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--primary);
  width: 0;
  z-index: 100;
  transition: width 80ms linear;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 480ms cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== HERO =================================================== */

.about-hero {
  padding: 96px 0 64px;
  position: relative;
}
.about-hero h1 {
  text-wrap: pretty;
  max-width: 920px;
}

/* ===== FOUNDER BLOCK — workstation photo (zoom-parallax) ====== */

.founder-block { padding: 64px 0 96px; }
.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 72px;
  align-items: center;
}
.founder-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-2xl);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-lg);
  /* zoom-parallax baseline — JS overrides on scroll */
  transform: scale(0.96) translateY(12px);
  transform-origin: center center;
  will-change: transform;
}
.founder-copy h2 {
  text-wrap: pretty;
  margin-bottom: 24px;
}
.founder-copy p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  margin: 0 0 18px;
}
.founder-copy .typed::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  color: var(--primary);
  animation: tw-blink 1.05s steps(2) infinite;
}
.founder-copy .typed.is-done::after { display: none; }
@keyframes tw-blink { 50% { opacity: 0; } }
.founder-copy .btn { margin-top: 8px; }

/* ===== ODOMETER STATS ========================================= */

.about-stats {
  background: var(--surface-soft);
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.about-stat {
  text-align: center;
}
.odometer {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 400;
  color: var(--primary-active);
  letter-spacing: -1.2px;
  overflow: hidden;
  height: 1.05em;
  display: flex;
  justify-content: center;
  align-items: baseline;
}
.odo-digit {
  display: inline-block;
  overflow: hidden;
  height: 1.05em;
  position: relative;
}
.odo-strip {
  display: flex;
  flex-direction: column;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.odo-strip span {
  display: block;
  height: 1.05em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat-prefix, .stat-suffix {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  color: var(--primary-active);
}
.stat-prefix { margin-right: 4px; }
.stat-suffix { margin-left: 4px; vertical-align: top; }
.about-stat .stat-label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 0.2px;
}

/* ===== DUBLIN BAND — cursor-reveal ============================ */

.dublin-band {
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: 96px 0;
  overflow: hidden;
}
.dublin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.dublin-copy h2 {
  text-wrap: pretty;
  margin-bottom: 20px;
}
.dublin-copy p {
  color: var(--on-dark-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  max-width: 480px;
}

/* The reveal canvas — image starts dim/desaturated, cursor brings
   it to life under a soft circular mask. */
.cursor-reveal {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: #000;
  cursor: none;
  isolation: isolate;
}
.cursor-reveal-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  /* dim baseline */
  filter: grayscale(0.7) brightness(0.55);
  transition: filter 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cursor-reveal-mask {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  /* clipped to a soft circle around the cursor */
  -webkit-mask-image: radial-gradient(
    240px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.85) 40%,
    rgba(0,0,0,0) 75%
  );
          mask-image: radial-gradient(
    240px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.85) 40%,
    rgba(0,0,0,0) 75%
  );
  opacity: 0;
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cursor-reveal.is-active .cursor-reveal-mask { opacity: 1; }
.cursor-reveal-cursor {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--canvas);
  border: 2px solid var(--primary);
  pointer-events: none;
  transform: translate(-50%, -50%);
  left: var(--cx, 50%);
  top: var(--cy, 50%);
  opacity: 0;
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
  mix-blend-mode: difference;
}
.cursor-reveal.is-active .cursor-reveal-cursor { opacity: 1; }
.cursor-reveal-hint {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  background: rgba(20, 20, 19, 0.5);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cursor-reveal.is-active .cursor-reveal-hint { opacity: 0; }

/* Touch devices: no cursor — show full image as fallback */
@media (hover: none) {
  .cursor-reveal { cursor: default; }
  .cursor-reveal-img { filter: none; }
  .cursor-reveal-mask, .cursor-reveal-cursor, .cursor-reveal-hint { display: none; }
}

/* ===== CONTACT — spotlight-border ============================= */

.contact-section {
  padding: 96px 0 120px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: start;
}
.contact-intro h2 {
  text-wrap: pretty;
  margin: 12px 0 18px;
}
.contact-intro p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  max-width: 460px;
}
.contact-intro p + p {
  margin-top: 12px;
  color: var(--muted);
}
.contact-form-panel {
  position: relative;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2xl);
  padding: 40px;
  isolation: isolate;
  overflow: hidden;
}
.contact-form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(31, 122, 92, 0.14),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: -1;
}
.contact-form-panel:hover::before { opacity: 1; }

.contact-form .form-row {
  margin-bottom: 18px;
}
.contact-form label {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--body-strong);
  margin-bottom: 6px;
}
.contact-form .input { width: 100%; }
.contact-form textarea.input {
  min-height: 132px;
  padding-top: 12px;
  resize: vertical;
}
.contact-form .form-status {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 13px;
  min-height: 1.4em;
}
.contact-form .form-status.ok { color: var(--success); }
.contact-form .form-status.err { color: var(--error); }
.contact-form button[type="submit"] { width: 100%; }
.contact-form .form-fallback {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ===== RESPONSIVE ============================================= */

@media (max-width: 960px) {
  .founder-grid { grid-template-columns: 1fr; gap: 48px; }
  .founder-photo { max-width: 380px; margin: 0 auto; }
  .about-stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .dublin-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .about-hero { padding: 64px 0 32px; }
  .founder-block { padding: 32px 0 64px; }
  .about-stats { padding: 48px 0; }
  .dublin-band { padding: 64px 0; }
  .contact-form-panel { padding: 28px; }
}

/* ===== REDUCED MOTION ========================================= */

@media (prefers-reduced-motion: reduce) {
  .reveal, .founder-photo, .odo-strip, .cursor-reveal-mask,
  .contact-form-panel::before {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* Cursor-reveal: show full image, no mask, no cursor dot */
  .cursor-reveal-img { filter: none; }
  .cursor-reveal-mask, .cursor-reveal-cursor, .cursor-reveal-hint { display: none; }
  .founder-copy .typed::after { display: none; }
}
