/* ============================================================
   Drew — portfolio styles
   Edit colors/fonts in :root. Every image slot is a .ph box;
   replace it with <img src="images/..." alt="..."> (see README notes in HTML comments).
   ============================================================ */

:root {
  --red: #a32e27;     /* page background */
  --cream: #f5ebd7;   /* text on red, buttons, footer band */
  --ink: #1f1b16;     /* black ink */
  --turkey: #b5302a;  /* tiny accents */
  --paper: #fbf3e4;
  --white: #ffffff;
  --pink: #f0c9c0;    /* dim text on red */
  --gray: #6b6254;    /* captions on cream */

  --ph: #d9d9d9;     /* placeholder grey (from your Figma) */
  --sidebar: 230px;
  --round: 18px;     /* corner rounding for all images */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "EB Garamond", Georgia, serif;
  --font-ui: "Work Sans", system-ui, sans-serif; /* easy-to-read sans for the sidebar */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--red);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* ---------- Page frame: sidebar + main ---------- */
.page {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
  position: relative;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: relative;
  text-align: right;
}
/* stays in view while the page scrolls */
.sidebar-inner {
  position: sticky;
  top: 0;
  padding: 2.5rem 1.5rem 2rem 1.25rem;
}
/* dotted "x" stitching down the right edge */
.sidebar::after {
  content: "";
  position: absolute; top: 0; right: -6px; bottom: 0; width: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' stroke='%23ffffff' stroke-width='1' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") repeat-y center top;
  opacity: .35;
}
.wordmark {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 4.6rem;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  text-align: right;
  margin-bottom: 1rem;
}
.sidebar { font-family: var(--font-ui); }
.tagline { font-size: .9rem; line-height: 1.45; margin: 0 0 1.4rem; }
.handle { font-size: .85rem; line-height: 1.4; margin: 0 0 1rem; }
.handle b { font-weight: 600; }
.handle span { display: block; color: var(--pink); }
.tulip { width: 48px; height: auto; margin: 3rem 0 0 auto; }

/* ---------- Main column ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex; justify-content: flex-end; align-items: center; gap: .4rem;
  padding: .75rem 3rem .75rem 1rem;
  background: var(--red);
  border-bottom: 1px solid rgba(245, 235, 215, .25);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .04em;
}
.topnav a {
  text-decoration: none;
  padding: .3rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.topnav a:hover { border-color: var(--cream); }
.topnav a[aria-current="page"] { background: var(--cream); color: var(--red); }

.content { flex: 1; padding: 1.5rem 3rem 4rem 2rem; }

/* ---------- Placeholders (replace with art) ---------- */
.ph {
  background: var(--ph);
  display: block;
  width: 100%;
  overflow: hidden;
}
.ph img { width: 100%; height: 100%; object-fit: cover; }
.r-wide { aspect-ratio: 16 / 5; }
.r-tall { aspect-ratio: 3 / 4; }
.r-card { aspect-ratio: 4 / 3; }

/* ---------- Home ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 0 3rem 3rem 2rem;
}
.hero-env {
  display: block;
  width: 100%;
  aspect-ratio: 1414 / 2000;   /* same size as the night picture */
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--paper);
}
.hero-env video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-env:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

/* ---------- Balloon lift ---------- */
.hero-art {
  position: relative;
  aspect-ratio: 1414 / 2000;
  overflow: hidden;
  background: var(--ink);
}
.hero-art .night-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* balloon layer sits exactly where the balloon is in the full picture */
.hero-art .balloon {
  position: absolute;
  left: 26.874%; top: 45.250%; width: 48.091%; height: 47.750%;
  transition: transform 1.4s cubic-bezier(.3, .7, .3, 1);
}
.hero-art.lifted .balloon { transform: translateY(-22%); }

/* simple wind: a few short straight lines floating up */
.air-line {
  position: absolute;
  width: 3px; height: 9%;
  border-radius: 3px;
  background: var(--cream);
  opacity: 0;
}
.hero-art.lifted .air-line { animation: air-rise 4.5s ease-out infinite; }
@keyframes air-rise {
  0%   { opacity: 0;  transform: translateY(40%); }
  30%  { opacity: .9; }
  100% { opacity: 0;  transform: translateY(-260%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art .balloon { transition: none; }
  .hero-art.lifted .air-line { animation: none; opacity: .6; }
}

.stitch-top {
  height: 12px; margin: .25rem 0 1.25rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' stroke='%23ffffff' stroke-width='1' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") repeat-x left center;
  opacity: .35;
}

.selected {
  scroll-margin-top: 3.5rem;   /* leave room for the sticky nav */
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-content: center;   /* centers the section in the screen after the slide-down */
  min-height: min(100vh, 640px);
  padding: 2rem 3rem 2rem 2rem;
}
.selected h2 { font-size: 2.6rem; margin: 0; }
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.project-grid a { display: block; text-decoration: none; }
.project-grid .wide { grid-column: 1 / -1; }
.project-grid .ph { aspect-ratio: 3 / 2; }
.ph video { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-grid .wide .ph { aspect-ratio: 16 / 5; }
.project-grid span { display: block; font-size: .85rem; margin-top: .35rem; }

/* ---------- Project pages ---------- */
.case-top {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 1.5rem;
  align-items: start;
}
.case-top .ph { aspect-ratio: 1 / 2.6; }
.case h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 400; margin: 0; }
.case p, .case li { font-size: .92rem; line-height: 1.45; }
.case ul { margin: .3rem 0 1.5rem; padding-left: 1.2rem; }
.case .figure { margin: 2.5rem 0; }
.case .figure.narrow { width: 92%; margin-inline: auto; }

/* ---------- About ---------- */
.about h1 { font-size: 1.5rem; }
.about .headshot {
  width: 200px; aspect-ratio: 1; border-radius: 50%;
  background: var(--white); overflow: hidden; margin: 1.5rem 0;
}
.about .headshot img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer band ---------- */
.footer-band {
  background: var(--cream);
  color: var(--ink);
  padding: 3rem 2rem 1.25rem;
  width: 100%;
}
.footer-band .ph { width: min(330px, 70%); aspect-ratio: 2 / 1; margin: 0 auto; }
.footer-band .social { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 3rem; }
.footer-band .social a { display: block; width: 18px; height: 18px; color: var(--ink); transition: color .2s ease, transform .2s ease; }
.footer-band .social a:hover, .footer-band .social a:focus-visible { color: var(--turkey); transform: translateY(-2px); }
.footer-band .social svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.footer-band .social svg[fill="none"] { fill: none; }
.footer-band.slim { padding: 0; height: 2.2rem; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { text-align: left; }
  .sidebar-inner { position: static; padding: 1.5rem 1.25rem 0; }
  .wordmark { text-align: left; }
  .sidebar::after { display: none; }
  .wordmark { font-size: 4rem; display: inline-block; }
  .tulip { display: none; }
  .topnav { justify-content: flex-start; padding: .6rem 1rem; font-size: 1rem; }
  .content, .hero, .selected { padding-inline: 1.25rem; }
  .hero, .selected, .case-top { grid-template-columns: 1fr; }
  .case-top .ph { aspect-ratio: 16 / 5; order: -1; }
}

/* ---------- Cursor: small red dot, bigger black dot over clickable things ---------- */
html, body { cursor: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 20 20%22%3E%3Ccircle cx=%2210.0%22 cy=%2210.0%22 r=%226%22 fill=%22%23c4271f%22 stroke=%22%23f5ebd7%22 stroke-width=%222%22/%3E%3C/svg%3E") 10 10, auto; }
a, button, summary, [role="button"], label, input, select, textarea, .hero-env {
  cursor: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2228%22 height=%2228%22 viewBox=%220 0 28 28%22%3E%3Ccircle cx=%2214.0%22 cy=%2214.0%22 r=%229%22 fill=%22%231f1b16%22 stroke=%22%23f5ebd7%22 stroke-width=%222%22/%3E%3C/svg%3E") 14 14, pointer;
}

/* ---------- "Click to open" hint on the envelope ---------- */
.hero-env { position: relative; }
.env-hint {
  position: absolute;
  left: 0; right: 0; bottom: 18%;
  text-align: center;
  font-family: var(--font-display);   /* same serif as the site headings */
  font-style: italic;
  font-weight: 500;
  font-size: 1.9rem;
  letter-spacing: .02em;
  color: var(--ink);
  pointer-events: none;
  animation: hint-bounce 1.2s ease-in-out infinite;
  transition: opacity .3s ease;
}
.hero-env.played .env-hint { opacity: 0; animation: none; }
@keyframes hint-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .env-hint { animation: none; } }

/* ---------- Live time (sidebar) ---------- */
.local { margin: 1.25rem 0 0; font-size: .85rem; line-height: 1.4; }
.local span { display: block; }
.local-time { font-weight: 600; font-size: 1.05rem; }

/* ---------- Rounded corners on all images ---------- */
.ph, .hero-env, .hero-art, .headshot, .footer-band .ph { border-radius: var(--round); }
.hero-env, .hero-art, .ph { overflow: hidden; }
.project-grid .ph, .case .ph { border-radius: var(--round); }
