:root {
  --ground: #0d0c0a;
  --ground-soft: #161411;
  --paper: #f4f1ea;
  --ink: #e8e3d8;
  --ink-dim: #9a938a;
  --gold: #c8a24a;
  --line: rgba(200, 162, 74, 0.35);
  --hair: rgba(255, 255, 255, 0.07);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  /* clip, not hidden: hidden makes body a scroll container, which breaks
     window scroll events and the sticky scroll-hub */
  overflow-x: clip;
}
img { display: block; }
a { color: var(--gold); }
.small {
  font-family: 'Inter', sans-serif; font-weight: 300;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem;
}

/* ---------- NAV ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.3rem 2.4rem;
  background: linear-gradient(to bottom, rgba(13, 12, 10, 0.88), transparent);
  pointer-events: none;
}
nav > * { pointer-events: auto; }
nav .wordmark {
  font-size: 1.02rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
nav .links a {
  color: var(--ink-dim); text-decoration: none; margin-left: 1.8rem; transition: color 0.3s;
}
nav .links a:hover, nav .links a.here { color: var(--gold); }

/* ---------- HERO ---------- */
.hero {
  position: relative; height: 100vh; min-height: 640px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; overflow: hidden; padding: 0 1.5rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('img/Fumage-Descending-Smoke-Large-Format.jpg') center 38% / cover no-repeat;
  filter: brightness(0.42) contrast(1.05) saturate(0.7);
  transform: scale(1.05);
  animation: heroSettle 3.2s ease-out both;
}
@keyframes heroSettle { from { transform: scale(1.12); filter: brightness(0.2) contrast(1.05) saturate(0.4); } to { transform: scale(1.05); filter: brightness(0.42) contrast(1.05) saturate(0.7); } }
.hero-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(13,12,10,0.1) 0%, rgba(13,12,10,0.84) 100%); }
.hero > * { position: relative; }
.hero .small { color: var(--gold); margin-bottom: 1.6rem; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 300; letter-spacing: 0.04em; line-height: 1.12; max-width: 18ch;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p.lede {
  margin-top: 2rem; font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic; color: var(--ink-dim); max-width: 46ch; line-height: 1.6;
}
.scroll-hint { position: absolute; bottom: 2.2rem; color: var(--ink-dim); font-size: 1.4rem; animation: drift 3s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(8px); opacity: 1; } }

/* Page hero (interior pages) */
.page-hero { padding: 10rem 2.4rem 3rem; text-align: center; max-width: 900px; margin: 0 auto; }
.page-hero .small { color: var(--gold); display: block; margin-bottom: 1rem; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 300; }
.page-hero p { color: var(--ink-dim); font-style: italic; font-size: 1.15rem; margin-top: 1rem; line-height: 1.6; }

section { padding: 6rem 2.4rem; max-width: 1240px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 3.2rem; }
.section-head .small { color: var(--gold); display: block; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 300; }
.section-head p { color: var(--ink-dim); font-style: italic; font-size: 1.1rem; margin-top: 0.8rem; max-width: 56ch; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* ---------- SERIES FILTER ---------- */
.series-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 1.4rem; }
.series-filter button {
  font-family: 'Inter', sans-serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: none; border: none; color: var(--ink-dim); cursor: pointer;
  padding: 0.5rem 1rem; border-bottom: 1px solid transparent; transition: all 0.3s;
}
.series-filter button:hover { color: var(--ink); }
.series-filter button.active { color: var(--gold); border-bottom-color: var(--gold); }
.series-lede { text-align: center; color: var(--ink-dim); font-style: italic; font-size: 1.02rem; margin-bottom: 2.4rem; max-width: 60ch; margin-left: auto; margin-right: auto; line-height: 1.6; min-height: 1.7em; }

/* ---------- PATTERN GRID ---------- */
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 2.2rem; }
.pattern-grid figure { cursor: pointer; opacity: 0; transform: translateY(14px); animation: rise 0.7s ease forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.pattern-grid img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  padding: 0.7rem; box-sizing: border-box;
  border: 1px solid rgba(232, 227, 216, 0.07);
  filter: saturate(0.96); transition: transform 0.5s ease, filter 0.5s;
  background: var(--ground-soft);
}
.pattern-grid figure:hover img { transform: scale(1.02); filter: saturate(1.06); }
.pattern-grid figcaption { margin-top: 0.85rem; line-height: 1.45; }
.pattern-grid .title { font-size: 1.1rem; }
.pattern-grid .meta { font-family: 'Inter', sans-serif; font-size: 0.66rem; color: var(--ink-dim); letter-spacing: 0.08em; margin-top: 0.25rem; }
.pattern-grid .meta .price { color: var(--gold); }

/* ---------- DETAIL OVERLAY ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(10, 9, 7, 0.96); overflow-y: auto;
}
.overlay.open { display: block; }
.overlay-inner {
  max-width: 1150px; margin: 0 auto; padding: 5.5rem 2.4rem 4rem;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3.5rem; align-items: start;
}
.overlay-inner img { width: 100%; max-height: 82vh; object-fit: contain; }
.overlay .close {
  position: fixed; top: 1.4rem; right: 2rem; z-index: 101;
  background: none; border: none; color: var(--ink-dim); font-size: 2rem; cursor: pointer;
  font-family: 'Cormorant Garamond', serif; transition: color 0.3s;
}
.overlay .close:hover { color: var(--gold); }
.overlay h3 { font-size: 2rem; font-weight: 300; margin-bottom: 0.4rem; }
.overlay .medium { color: var(--ink-dim); font-style: italic; margin-bottom: 1.6rem; }
.overlay p.note { line-height: 1.75; font-size: 1.12rem; margin-bottom: 2.2rem; }
.acquire { border-top: 1px solid var(--line); }
.acquire .row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--hair);
}
.acquire .row span:first-child { font-size: 1.05rem; }
.acquire .row .sub { display: block; font-family: 'Inter', sans-serif; font-size: 0.63rem; color: var(--ink-dim); letter-spacing: 0.08em; margin-top: 0.28rem; }
.acquire .row a, .acquire .row .soon {
  font-family: 'Inter', sans-serif; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap; padding: 0.5rem 1.1rem; border-radius: 2rem;
}
.acquire .row a { color: var(--gold); text-decoration: none; border: 1px solid var(--line); transition: all 0.3s; }
.acquire .row a:hover { background: var(--gold); color: var(--ground); }
.acquire .row .soon { color: var(--ink-dim); border: 1px dashed var(--hair); }

/* ---------- IDEAS ---------- */
.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.8rem; }
.idea { text-decoration: none; color: inherit; display: block; }
.idea .glyph { color: var(--gold); font-size: 1.6rem; margin-bottom: 1.1rem; }
.idea h4 { font-size: 1.3rem; font-weight: 400; margin-bottom: 0.7rem; }
.idea p { color: var(--ink-dim); line-height: 1.7; font-size: 1.03rem; }
.idea .more { display: inline-block; margin-top: 0.9rem; color: var(--gold); font-style: italic; font-size: 0.98rem; }

/* Essays (ideas.html) */
.essay { max-width: 680px; margin: 0 auto; padding: 4rem 2.4rem; border-bottom: 1px solid var(--hair); }
.essay:last-of-type { border-bottom: none; }
.essay .glyph { color: var(--gold); font-size: 2rem; margin-bottom: 1.2rem; text-align: center; }
.essay h3 { font-size: 1.9rem; font-weight: 300; text-align: center; margin-bottom: 2rem; }
.essay p { line-height: 1.85; font-size: 1.17rem; margin-bottom: 1.3rem; }
.essay p em { color: var(--gold); }
.essay figure { margin: 2.5rem 0; }
.essay figure img { width: 100%; }
.essay figcaption { font-family: 'Inter', sans-serif; font-size: 0.65rem; color: var(--ink-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.7rem; text-align: center; }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-grid img { width: 100%; }
.about-text p { line-height: 1.85; font-size: 1.15rem; margin-bottom: 1.3rem; }
.prose { max-width: 680px; margin: 0 auto; }
.prose p { line-height: 1.85; font-size: 1.17rem; margin-bottom: 1.3rem; }

/* ---------- CONTACT / FOOTER ---------- */
.contact-band { text-align: center; background: var(--ground-soft); max-width: none; }
.contact-band .inner { max-width: 680px; margin: 0 auto; }
.contact-band h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 300; margin-bottom: 1rem; }
.contact-band p { color: var(--ink-dim); font-style: italic; line-height: 1.7; margin-bottom: 2rem; }
.btn {
  display: inline-block; font-family: 'Inter', sans-serif; font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--line); border-radius: 2rem; padding: 0.9rem 2.2rem;
  text-decoration: none; transition: all 0.3s;
}
.btn:hover { background: var(--gold); color: var(--ground); }
footer { text-align: center; padding: 3.5rem 2rem; color: var(--ink-dim); border-top: 1px solid var(--hair); line-height: 2; }

@media (max-width: 960px) {
  nav {
    flex-direction: column; align-items: center; gap: 0.55rem;
    padding: 0.9rem 1rem 0.7rem;
    background: linear-gradient(to bottom, rgba(13, 12, 10, 0.94), rgba(13, 12, 10, 0.6) 80%, transparent);
  }
  nav .links { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 0.3rem; }
  nav .links a { margin: 0 0.55rem; font-size: 0.6rem; letter-spacing: 0.12em; white-space: nowrap; }
  .page-hero { padding-top: 8.5rem; }
  section { padding: 4rem 1.3rem; }
  .overlay-inner { grid-template-columns: 1fr; padding: 4.5rem 1.3rem 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ground-field { height: 220vh; }
}

/* ---------- SCROLL HUB (rotating navigation) ---------- */
.smoke-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.9;
}
.hub-disc, .hub-panels { position: relative; z-index: 1; }
.hub-hint { z-index: 2; }

/* Ground state: black field, smoke waiting to be found. The pattern and
   words stay hidden until the seal is tapped (or the visitor scrolls). */
/* On touch devices the drag gesture must swirl smoke, not scroll — so the
   page is locked until the seal is tapped. (position:fixed on body is the
   only reliable scroll lock on iOS Safari.) */
html.ground-lock, html.ground-lock body { overflow: hidden; height: 100%; }
html.ground-lock body { position: fixed; inset: 0; width: 100%; }
@keyframes hubIn { to { opacity: 1; } }
@keyframes discIn { to { opacity: 1; transform: scale(1); } }
.hub-disc { opacity: 0; transform: scale(0.965); }
.hub-kicker, .hub-panels, .hub-dots { opacity: 0; }
.hub-stage .hub-hint { opacity: 0; animation: none; } /* base drift animation would override opacity */
body.hub-revealed .hub-disc { animation: discIn 2.4s ease 0.2s forwards; }
body.hub-revealed .hub-kicker { animation: hubIn 1.6s ease 2.2s forwards; }
body.hub-revealed .hub-panels { animation: hubIn 1.6s ease 2.6s forwards; }
body.hub-revealed .hub-dots { animation: hubIn 1.6s ease 3.2s forwards; }
body.hub-revealed .hub-stage .hub-hint { animation: hubIn 1.6s ease 3.8s forwards, drift 3s ease-in-out 3.8s infinite; }

/* The seal: a small Systema, top right, quietly inviting */
.reveal-icon {
  position: fixed; top: 4.8rem; right: 2.2rem; z-index: 40;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: none; cursor: pointer; overflow: hidden;
  opacity: 0.85;
  transition: opacity 0.6s, transform 0.6s;
  animation: sealBreathe 12s ease-in-out infinite;
}
.reveal-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.reveal-icon:hover { opacity: 1; transform: scale(1.08); }
@keyframes sealBreathe { 0%, 100% { box-shadow: 0 0 0 rgba(200,162,74,0); } 50% { box-shadow: 0 0 22px rgba(200,162,74,0.35); } }
body.hub-revealed .reveal-icon { opacity: 0; pointer-events: none; }

@media (max-width: 960px) {
  .reveal-icon { top: 6.8rem; right: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-disc, .hub-kicker, .hub-panels, .hub-dots, .hub-stage .hub-hint {
    opacity: 1; transform: none; animation: none;
  }
  .reveal-icon { display: none; }
}
.hub { height: 620vh; position: relative; }
.hub-stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  max-width: 1240px; margin: 0 auto; padding: 0 2.4rem; gap: 2rem;
}
.hub-kicker {
  position: absolute; top: 5.5rem; left: 0; right: 0; text-align: center;
  color: var(--ink-dim); z-index: 2;
}
.hub-disc {
  justify-self: center;
  width: min(64vmin, 560px); height: min(64vmin, 560px);
  border-radius: 50%; overflow: hidden; position: relative;
  box-shadow: 0 0 120px rgba(200, 162, 74, 0.14), 0 0 40px rgba(0,0,0,0.8);
  outline: 1px solid var(--line); outline-offset: 6px;
}
.hub-disc img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.02); will-change: transform;
}
.hub-panels { position: relative; min-height: 15rem; }
.hub-panel {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.hub-panel.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.hub-panel .small { color: var(--gold); margin-bottom: 0.9rem; }
.hub-panel h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 300; line-height: 1.1; }
.hub-panel p { color: var(--ink-dim); font-style: italic; font-size: 1.15rem; margin-top: 1rem; line-height: 1.6; max-width: 38ch; }
.hub-panel .btn { margin-top: 1.8rem; }
.hub-dots {
  position: absolute; right: 1.6rem; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 1rem; z-index: 3;
}
.hub-dots button {
  background: none; border: none; cursor: pointer; padding: 0.15rem;
  opacity: 0.35; transition: opacity 0.4s; line-height: 0;
}
.hub-dots button svg { width: 26px; height: 26px; }
.hub-dots button.active, .hub-dots button:hover { opacity: 1; }
.hub-hint {
  position: absolute; bottom: 2rem; left: 0; right: 0; text-align: center;
  color: var(--ink-dim); font-size: 1.3rem; animation: drift 3s ease-in-out infinite;
}

/* icon strokes */
.glyph-icon { stroke: var(--gold); fill: none; stroke-width: 1.4; }
.glyph-icon .fillp { fill: var(--gold); stroke: none; }
.glyph-icon .inkline { stroke: #b7b1a6; }

/* ---------- SITE MAP ---------- */
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
.map-card {
  text-decoration: none; color: inherit; text-align: center;
  border: 1px solid var(--hair); padding: 2.6rem 1.6rem 2.2rem;
  transition: border-color 0.4s, transform 0.4s;
}
.map-card:hover { border-color: var(--line); transform: translateY(-4px); }
.map-card svg { width: 54px; height: 54px; margin-bottom: 1.2rem; }
.map-card h4 { font-size: 1.25rem; font-weight: 400; margin-bottom: 0.5rem; }
.map-card p { color: var(--ink-dim); font-size: 0.98rem; line-height: 1.55; font-style: italic; }
.map-card .ext { font-family: 'Inter', sans-serif; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); display: block; margin-top: 0.7rem; }

footer .practice-line { margin-top: 0.4rem; }
footer .practice-line a { color: var(--ink-dim); text-decoration: underline; text-underline-offset: 3px; }
footer .practice-line a:hover { color: var(--gold); }

@media (max-width: 900px) {
  .hub { height: 640vh; }
  .hub-stage { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 2.2rem; padding-top: 8.5rem; }
  .hub-kicker { top: 6.6rem; padding: 0 2rem; }
  .hub-disc { width: 58vw; height: 58vw; }
  .hub-panels { min-height: 17rem; }
  .hub-panel { align-items: center; text-align: center; }
  .hub-dots { right: 0.7rem; gap: 0.7rem; }
  .hub-dots button svg { width: 20px; height: 20px; }
  .map-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-disc img { transform: scale(1.02) !important; }
  .hub-panel { transition: opacity 0.3s; transform: none; }
}
