/* =========================================================
   Patterson Robey — style.css
   One-page composition. Editorial silence + heritage stone.
   ========================================================= */

/* --- Page shell: full-height, three-row layout --- */
.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  padding: var(--page-pad-y) var(--page-pad-x);
  gap: var(--s-8);
  position: relative;
}

/* Subtle paper texture via gradient — no extra image needed */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 60%, rgba(0,0,0,0.04) 100%),
    radial-gradient(80% 60% at 50% 100%, transparent 55%, rgba(0,0,0,0.05) 100%);
  z-index: 0;
}
[data-theme="dark"] .page::before {
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 60%, rgba(0,0,0,0.45) 100%),
    radial-gradient(80% 60% at 50% 100%, transparent 55%, rgba(0,0,0,0.5) 100%);
}

.page > * { position: relative; z-index: 1; }

/* --- Topbar: monogram only --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.92;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
.mark:hover { opacity: 1; }
.mark-svg { width: 40px; height: 40px; }
@media (min-width: 720px) { .mark-svg { width: 44px; height: 44px; } }

/* --- Hero: figure + name --- */
.hero {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(28px, 5vw, 56px);
  padding-block: clamp(16px, 4vh, 56px);
  width: 100%;
}

.hero-figure {
  width: min(560px, 92vw);
  position: relative;
  isolation: isolate;
}
.hero-figure picture {
  display: block;
  position: relative;
}
.hero-figure picture::before,
.hero-figure picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-figure picture::before {
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 11%, transparent 89%, var(--bg) 100%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 12%, transparent 88%, var(--bg) 100%);
}
.hero-figure picture::after {
  background: radial-gradient(70% 68% at 50% 48%, transparent 42%, rgba(0,0,0,0.55) 100%);
  mix-blend-mode: multiply;
  opacity: 0.58;
}
.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  box-shadow:
    0 44px 80px -56px rgba(255,255,255,0.18),
    0 40px 96px -42px rgba(0,0,0,0.95);
  filter: grayscale(0.18) saturate(0.48) contrast(1.08) brightness(0.76);
  opacity: 0.82;
  transition: filter var(--dur) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-theme="dark"] .hero-figure img {
  box-shadow:
    0 44px 80px -56px rgba(255,255,255,0.18),
    0 40px 96px -42px rgba(0,0,0,0.95);
  filter: grayscale(0.18) saturate(0.48) contrast(1.08) brightness(0.76);
}

/* --- Brand wordmark --- */
.hero-text {
  text-align: center;
  display: grid;
  gap: var(--s-3);
  width: 100%;
}
.brand {
  font-family: var(--font-display);
  font-weight: 350;
  font-style: normal;
  font-size: var(--text-hero);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: grid;
  gap: clamp(2px, 0.5vw, 8px);
  justify-content: center;
  text-align: center;
}
.brand-line {
  display: block;
  font-variant-ligatures: common-ligatures discretionary-ligatures;
}
.brand-line--two {
  font-style: normal;
  font-weight: 350;
  letter-spacing: -0.04em;
}

/* On wide screens, set the name on a single line for confidence */
@media (min-width: 880px) {
  .brand {
    grid-auto-flow: column;
    justify-content: center;
    gap: clamp(14px, 1.6vw, 28px);
    align-items: baseline;
  }
}

/* --- Footer: email only --- */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  width: 100%;
}
.email {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: var(--s-2) var(--s-3);
  position: relative;
  transition: color var(--dur-fast) var(--ease);
}
.email::after {
  content: "";
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: 4px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.email:hover,
.email:focus-visible {
  color: var(--ink);
}
.email:hover::after,
.email:focus-visible::after {
  opacity: 0.6;
  transform: translateY(0);
}

/* --- Contact page --- */
.page--contact { grid-template-rows: auto 1fr; }
.contact-panel {
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(20px, 3vw, 40px);
  width: min(760px, 92vw);
  padding-block: clamp(56px, 12vh, 144px);
  position: relative;
  text-align: center;
}
.contact-panel::before,
.contact-panel::after {
  content: "";
  width: min(132px, 30vw);
  height: 1px;
  background: var(--rule);
}
.contact-panel::before { order: 2; }
.contact-panel::after { order: 4; }
.contact-label {
  order: 1;
  font-family: var(--font-ui);
  font-size: clamp(17px, 1vw + 0.8rem, 26px);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.contact-email {
  order: 3;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw + 1rem, 82px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.012em;
  color: var(--ink);
  padding: var(--s-2) var(--s-3);
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  transition: color var(--dur-fast) var(--ease);
}
.contact-email:hover,
.contact-email:focus-visible {
  color: var(--ink);
}

/* --- Entrance animation: subtle, single beat --- */
@keyframes pr-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pr-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.mark        { animation: pr-fade var(--dur-slow) var(--ease) both; animation-delay: 60ms; }
.hero-figure { animation: pr-rise var(--dur-slow) var(--ease) both; animation-delay: 140ms; }
.brand       { animation: pr-rise var(--dur-slow) var(--ease) both; animation-delay: 320ms; }
.footer      { animation: pr-fade var(--dur-slow) var(--ease) both; animation-delay: 520ms; }

/* --- Small screens: tighten rhythm --- */
@media (max-width: 520px) {
  .page {
    min-height: 100svh;
    padding: clamp(24px, 7vw, 36px) clamp(16px, 5vw, 24px);
    gap: var(--s-6);
  }
  .mark-svg { width: 38px; height: 38px; }
  .hero {
    gap: 30px;
    padding-block: clamp(12px, 3vh, 28px);
  }
  .hero-figure { width: min(430px, 94vw); }
  .brand {
    font-size: clamp(56px, 15.5vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.038em;
  }
  .footer { padding-top: var(--s-4); }
  .contact-panel {
    width: min(520px, 94vw);
    gap: var(--s-5);
    padding-block: clamp(48px, 14vh, 104px);
  }
  .contact-panel::before,
  .contact-panel::after {
    width: min(120px, 38vw);
  }
  .contact-label {
    font-size: clamp(17px, 4.8vw, 22px);
  }
  .contact-email {
    font-size: clamp(26px, 8vw, 42px);
    line-height: 1.08;
  }
}

@media (min-width: 1200px) {
  .hero-figure { width: min(600px, 44vw); }
  .contact-panel { width: min(860px, 78vw); }
}

/* --- Print: clean monochrome --- */
@media print {
  .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .hero-figure img { box-shadow: none; filter: none; }
}
