/* ============================================================
   STYLE.CSS — Personal Site
   ============================================================
   All design tokens live at the top. Change a value once
   and it updates across the entire site.
   ============================================================ */


/* ── 1. Design Tokens ────────────────────────────────────── */
:root {
  /* --- Colours: edit these to retheme the whole site --- */
  --ink:          #1a1714;   /* main text */
  --parchment:    #f5f0e8;   /* slightly warmer surface */
  --cream:        #faf7f2;   /* page background */
  --warm-mid:     #e8dfd0;   /* borders, dividers */
  --rust:         #8b3a2a;   /* primary accent */
  --rust-light:   #c4614d;
  --gold:         #a8894a;   /* secondary accent */
  --gold-light:   #d4af6a;
  --slate:        #4a5568;   /* secondary text */
  --muted:        #8a8070;   /* labels, metadata */

  /* --- Fonts: change here to swap typefaces globally --- */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;
  --font-accent:  'Libre Baskerville', Georgia, serif;

  /* --- Spacing & Sizing --- */
  --nav-height: 72px;
  --section-pad: clamp(3rem, 8vw, 6rem);
  --side-pad:    clamp(1.5rem, 5vw, 4rem);
  --max-width:   1100px;
}


/* ── 2. Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: pageEnter 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

img { max-width: 100%; height: auto; display: block; }


/* ── 3. Cursor: Dot + Accent Ring ────────────────────────
   The real OS pointer stays visible (no cursor:none anywhere).
   A small solid dot and a ring both ride alongside it 1:1
   with zero lag, positioned via JS on every mousemove. */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--rust);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.12s ease, height 0.12s ease, background-color 0.12s ease;
  will-change: transform;
}
body:has(a:hover, button:hover, [onclick]:hover) #cursor {
  width: 8px; height: 8px;
  background: var(--gold);
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border: 1px solid var(--rust);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.12s ease, height 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
  opacity: 0.5;
  will-change: transform;
}
/* Expand + recolour both on hoverable elements */
body:has(a:hover, button:hover, [onclick]:hover) #cursor-ring {
  width: 42px; height: 42px;
  opacity: 0.35;
  border-color: var(--gold);
}


/* ── 3b. Splash Screen ───────────────────────────────────
   Shown once per tab session by js/splash.js. The overlay
   itself has no animation (avoids any transform on it, since
   a transform here would create a containing block — see the
   note on body's own animation further down). Only the mark
   and rule inside it animate. */
html.splash-lock,
html.splash-lock body { overflow: hidden; height: 100%; }

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  background: var(--cream);
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#splash-screen.splash-out { opacity: 0; pointer-events: none; }

.splash-mark {
  width: clamp(80px, 25vw, 150px);
  color: var(--rust);
  opacity: 0;
  transform: scale(0.9) translateY(8px);
  filter: blur(2px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s ease;
}
.splash-mark svg { display: block; width: 100%; height: auto; }

.splash-rule {
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
}

#splash-screen.splash-in .splash-mark {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}
#splash-screen.splash-in .splash-rule { width: 60px; }


/* ── 4. Noise Texture Overlay ────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9997;
  opacity: 0.4;
}


/* ── 5. Navigation ───────────────────────────────────────── */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 var(--side-pad);
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--warm-mid);
  transition: box-shadow 0.3s ease;
}
#site-nav.scrolled { box-shadow: 0 2px 24px rgba(26, 23, 20, 0.06); }

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--rust);
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-logo:hover { color: var(--gold); transform: translateY(-1px); }

.nav-logo-mark svg {
  display: block;
  height: 65px;
  width: auto;
  color: inherit; /* logo's fill="currentColor" picks this up */
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

.nav-links a {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--rust);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover            { color: var(--rust); }
.nav-links a:hover::after,
.nav-links a.active::after    { transform: scaleX(1); }
.nav-links a.active           { color: var(--ink); }


/* ── 6. Page & Section Layout ────────────────────────────── */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height);
}

.section-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: clamp(1.5rem, 4vw, 3rem) var(--side-pad) clamp(2rem, 5vw, 4rem);
}

.section-wrap--wide { max-width: 1400px; }
.section-wrap--wide .hero-bio { max-width: none; font-size: 1.1rem; margin-bottom: 1.25rem; opacity: 1; animation: none; }

.section-header  { margin-bottom: clamp(1rem, 2vw, 1.75rem); }
.section-label {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  font-style: italic;
}
.section-rule {
  width: 60px; height: 1px;
  background: var(--gold);
  margin: 1.5rem 0;
}


/* ── 7. Shared Components ────────────────────────────────── */

/* Ink ornament divider */
.ink-divider {
  display: flex; align-items: center; gap: 1.5rem;
  margin: 3rem 0;
}
.ink-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--warm-mid), transparent);
}
.ink-ornament {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  font-style: italic;
  user-select: none;
}

/* Card with corner mark */
.script-card {
  padding: 2rem;
  border: 1px solid var(--warm-mid);
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}
.script-card:hover {
  border-color: var(--gold-light);
  box-shadow: 4px 4px 0 var(--warm-mid);
}
.script-card-glyph {
  font-family: var(--font-display);
  font-size: 4rem;
  font-style: italic;
  color: var(--rust);
  margin-bottom: 1rem;
  line-height: 1;
}
.script-card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; margin-bottom: 0.5rem; }
.script-card p  { font-size: 0.92rem; color: var(--slate); }
.script-corner {
  position: absolute; top: -1px; right: -1px;
  width: 24px; height: 24px;
  background: var(--gold-light);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* Price list (tutoring) */
.price-list { list-style: none; border-top: 1px solid var(--warm-mid); }
.price-list li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--warm-mid);
}
.price-service {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.3;
}
.price-leader {
  flex: 1;
  border-bottom: 1px dotted var(--gold-light);
  transform: translateY(-0.3em);
  min-width: 1rem;
}
.price-amount {
  font-family: var(--font-accent);
  font-size: 0.95rem;
  color: var(--rust);
  white-space: nowrap;
}

/* Read-more link */
.read-more {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  display: inline-block;
}
.read-more::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.read-more:hover::after { transform: scaleX(1); }

/* Pill tag */
.pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--warm-mid);
  font-family: var(--font-accent);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  cursor: default;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pill:hover { border-color: var(--rust); background: var(--rust); color: white; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible             { opacity: 1; transform: translateY(0); }
.reveal.reveal-d1           { transition-delay: 0.1s; }
.reveal.reveal-d2           { transition-delay: 0.2s; }
.reveal.reveal-d3           { transition-delay: 0.3s; }


/* ── 8. Footer ───────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--warm-mid);
  padding: 1.75rem var(--side-pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: var(--parchment);
}
.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
}
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a {
  font-family: var(--font-accent);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--rust); }


/* ══════════════════════════════════════════════════════════
   PAGE-SPECIFIC STYLES
   ══════════════════════════════════════════════════════════ */


/* ── 9. Home — Hero ──────────────────────────────────────
   Name is centred across the top; bio (left) and logo (right)
   sit below it, separated by a thin vertical divider. Sizes
   scale with the viewport so the whole page + footer fits on
   one desktop screen. */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 2.5vh, 2rem) 0 clamp(1rem, 3vh, 2.5rem);
  position: relative;
  overflow: hidden;
}
.hero-name,
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: clamp(1rem, 3.5vh, 2.25rem);
  padding: 0 var(--side-pad);
  opacity: 0; animation: fadeUp 0.6s 0.35s ease both;
}
.hero-name em,
.page-title em { display: block; font-style: italic; color: var(--rust); font-weight: 400; }

.hero-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.hero-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.5rem, 3.5vw, 4rem) 0 clamp(2rem, 6vw, 6rem);
  position: relative;
}
.hero-left::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--warm-mid), transparent);
}
.hero-bio {
  font-size: clamp(1.1rem, 0.55rem + 1.35vh, 1.4rem);
  line-height: 1.7;
  color: var(--slate);
  max-width: 62ch;
  margin-bottom: clamp(0.9rem, 2vh, 1.5rem);
  opacity: 0; animation: fadeUp 0.6s 0.5s ease both;
}
.hero-bio:last-child { margin-bottom: 0; }

.hero-right {
  display: flex; align-items: center; justify-content: center;
  padding: 0 3rem;
  position: relative;
}
.hero-logo-mark {
  width: clamp(160px, 26vw, 320px);
  color: var(--rust);
  opacity: 0;
  animation: fadeUp 0.7s 0.4s ease both;
}
.hero-logo-mark svg { display: block; width: 100%; height: auto; }

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

/* Home nav cards */
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.home-cards--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
}
.home-card { cursor: default; }


/* ── 10. Shared Page-Body Text ───────────────────────────── */
.lead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--slate);
}
.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 0.8;
  margin: 0.1em 0.12em 0 0;
  color: var(--rust);
  font-style: italic;
}
.pull-quote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--slate);
  background: linear-gradient(to right, rgba(168,137,74,0.06), transparent);
}


/* ── 15. Responsive ──────────────────────────────────────── */
@media (hover: none) {
  #cursor, #cursor-ring { display: none; }
}

/* Tablets & below: stack the hero, drop the divider + big logo */
@media (max-width: 820px) {
  .hero-body { grid-template-columns: 1fr; align-items: start; }
  .hero-right { display: none; }
  .hero-left { padding: 0 var(--side-pad); }
  .hero-left::after { display: none; }
  .hero-bio { max-width: 60ch; margin-left: auto; margin-right: auto; }
}

/* Phones */
@media (max-width: 600px) {
  :root { --nav-height: 60px; }
  body { font-size: 16px; cursor: auto; }
  #cursor, #cursor-ring { display: none; }

  .nav-logo-mark svg { height: 46px; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.68rem; letter-spacing: 0.12em; }

  .hero { padding-top: 1.25rem; }
  .hero-name, .page-title { font-size: clamp(2.6rem, 14vw, 3.6rem); }
  .hero-bio { font-size: 1.05rem; line-height: 1.65; }

  .section-wrap--wide .hero-bio { font-size: 1rem; }

  /* Price list: name wraps naturally, price stays right, no dotted leader */
  .price-list li { gap: 0.9rem; padding: 0.8rem 0; }
  .price-service { flex: 1; font-size: 1.15rem; }
  .price-leader { display: none; }
  .price-amount { font-size: 0.85rem; text-align: right; }

  #site-footer { flex-direction: column; justify-content: center; text-align: center; padding: 1.5rem var(--side-pad); gap: 0.6rem; }
  .footer-links { gap: 1.5rem; }
}
