/* ============================================================
   Shin Hyun
   Type:    Inter Tight, everywhere. Weight and tracking carry the
            hierarchy — no second family.
   Palette: pulled from his photography — near-black room, ember of a
            brass lamp, dawn paper. One accent, used sparingly.
   Motion:  slow, weighted, always released once. Nothing loops, nothing
            bounces.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,300..700;1,400&display=swap');

:root {
  /* surface */
  --ink: #0a0a0b;
  --raise: #121214;
  --raise-2: #17171a;

  /* type */
  --paper: #f4f2ee;
  --muted: #8e8a84;
  --faint: rgba(244, 242, 238, 0.42);

  /* accent — burnt brass, the lamp in the 4am frame */
  --ember: #c67a3e;
  --ember-lift: #d98f4f;
  --ember-wash: rgba(198, 122, 62, 0.1);

  --line: rgba(244, 242, 238, 0.11);
  --line-strong: rgba(244, 242, 238, 0.2);

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1180px;
  --measure: 33em;

  --font: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 16.5px/1.62 var(--font);
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ember); color: #120c06; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 780px; }

/* ---------------- micro type ---------------- */

/* The small caps used for utility bars, eyebrows and buttons. Tracking is
   what makes this read as considered rather than shouty. */
.micro {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  line-height: 1;
}

/* ---------------- utility bar ---------------- */

.utility {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px var(--gutter);
  background: #060607;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.utility .ember { color: var(--ember); }
.utility a { color: inherit; text-decoration: none; transition: color 0.35s var(--ease-soft); }
.utility a:hover { color: var(--paper); }
.utility .mid { display: none; }

@media (min-width: 800px) {
  .utility .mid { display: block; }
}

/* ---------------- sticky bar ---------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  transform: translateY(-101%);
  transition: transform 0.65s var(--ease);
}

.topbar.visible { transform: translateY(0); }

.topbar a { color: var(--paper); text-decoration: none; }
.topbar .btn-sm {
  background: var(--ember);
  color: #120c06;
  padding: 9px 18px;
  border-radius: 2px;
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  padding: clamp(48px, 9vh, 96px) 0 clamp(40px, 7vh, 72px);
  overflow: hidden;
}

/* A single soft ember glow behind the type — suggests the lamp without
   putting another image on the page. */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 90%;
  background: radial-gradient(circle, rgba(198, 122, 62, 0.14), transparent 66%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

.rule-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
  color: var(--ember);
}

.rule-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

h1 {
  font-size: clamp(38px, 6.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 600;
  margin: 0 0 26px;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}

.lede {
  font-size: clamp(16.5px, 1.7vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 34px;
  max-width: 32em;
}

/* framed portrait, echoing the reference's plate treatment */
.plate {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line-strong);
  background: var(--raise);
}

.plate img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
}

/* The profile photo is circle-cropped at source. Narrow screens make the plate
   wide enough that a 4:5 crop clips the circle badly — square keeps it whole. */
@media (max-width: 899px) {
  .plate img { aspect-ratio: 1; }
}

.plate figcaption {
  margin-top: 10px;
  padding: 0 2px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ---------------- buttons ---------------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ember);
  background: var(--ember);
  color: #120c06;
  padding: 16px 28px;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  transition: background 0.4s var(--ease-soft), transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease), color 0.4s var(--ease-soft);
}

.btn:hover {
  background: var(--ember-lift);
  border-color: var(--ember-lift);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -16px rgba(198, 122, 62, 0.8);
}

.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: progress; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
  box-shadow: none;
}

.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

/* ---------------- stat band ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats div {
  padding: 26px var(--gutter) 26px 0;
  border-right: 1px solid var(--line);
}

.stats div:last-child { border-right: 0; }

.stats b {
  display: block;
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.stats span { color: var(--muted); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------------- sections ---------------- */

section { padding: clamp(64px, 11vh, 118px) 0; border-top: 1px solid var(--line); }

.sec-head { margin-bottom: clamp(36px, 5vw, 56px); }

.numeral {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ember);
  display: block;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(27px, 4.1vw, 43px);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 600;
  margin: 0 0 18px;
  text-wrap: balance;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

p { margin: 0 0 20px; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.dim { color: var(--muted); }

.thesis {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  letter-spacing: -0.018em;
  color: var(--muted);
  max-width: 30em;
}

blockquote {
  margin: 0;
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1.34;
  letter-spacing: -0.028em;
  font-weight: 500;
  text-wrap: balance;
}

blockquote cite {
  display: block;
  margin-top: 18px;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ember);
}

/* ---------------- chapter groups ---------------- */

.groups {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 720px) { .groups { grid-template-columns: repeat(2, 1fr); } }

.group {
  background: var(--ink);
  padding: 30px 26px;
  transition: background 0.5s var(--ease-soft);
}

.group:hover { background: var(--raise); }

.group .micro { color: var(--ember); margin-bottom: 14px; display: block; }
.group p { color: var(--muted); font-size: 15px; margin: 0; }

.group ul { list-style: none; margin: 14px 0 0; padding: 0; }

.group li {
  position: relative;
  padding: 7px 0 7px 20px;
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.group li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 7px;
  height: 1px;
  background: var(--ember);
}

/* ---------------- receive grid ---------------- */

.receive { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }

@media (min-width: 640px) { .receive { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .receive { grid-template-columns: repeat(3, 1fr); } }

.receive > div {
  background: var(--ink);
  padding: 30px 26px;
  transition: background 0.5s var(--ease-soft);
}

.receive > div:hover { background: var(--raise); }
.receive .idx { color: var(--ember); margin-bottom: 16px; display: block; }
.receive p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------------- offer cards ---------------- */

.offers { display: grid; gap: 20px; }

@media (min-width: 860px) { .offers { grid-template-columns: repeat(2, 1fr); } }

.offer {
  position: relative;
  background: var(--raise);
  border: 1px solid var(--line);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.5s var(--ease-soft), transform 0.5s var(--ease);
}

.offer:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.offer.featured { border-color: var(--ember); }

.badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--ember);
  color: #120c06;
  padding: 6px 12px;
}

.price { display: flex; align-items: baseline; gap: 12px; margin: 20px 0 4px; }

.price b {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.price s { color: var(--faint); font-size: 18px; }

.offer ul { list-style: none; margin: 22px 0 28px; padding: 0; }

.offer li {
  position: relative;
  padding: 9px 0 9px 26px;
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.offer li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 9px;
  color: var(--ember);
  font-size: 13px;
}

.offer .btn { justify-content: center; margin-top: auto; }

/* ---------------- forms ---------------- */

.signup { display: flex; gap: 10px; flex-wrap: wrap; max-width: 500px; margin-top: 30px; }

input[type='email'] {
  flex: 1 1 240px;
  min-width: 0;
  background: var(--raise);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 16px 17px;
  color: var(--paper);
  font: 400 15.5px var(--font);
  transition: border-color 0.4s var(--ease-soft), background 0.4s var(--ease-soft);
}

input[type='email']::placeholder { color: var(--faint); }

input[type='email']:focus {
  outline: none;
  border-color: var(--ember);
  background: var(--ember-wash);
}

.msg { font-size: 15px; margin-top: 16px; min-height: 22px; }
.msg.bad { color: #d9765d; }
.msg.good { color: var(--ember); }

.note { font-size: 14px; color: var(--muted); margin-top: 16px; max-width: var(--measure); }

/* ---------------- footer ---------------- */

footer { padding: 52px 0 76px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

.foot-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: baseline; }

footer a { color: var(--ember); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.4s var(--ease-soft); }
footer a:hover { border-bottom-color: var(--ember); }

.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------------- legal / doc pages ---------------- */

.doc { max-width: 720px; padding: clamp(48px, 9vh, 88px) 0 96px; }

.doc h1 {
  font-size: clamp(30px, 4.6vw, 44px);
  margin-bottom: 12px;
}

.doc .updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 44px;
}

.doc h2 {
  font-size: clamp(19px, 2.4vw, 23px);
  margin: 44px 0 14px;
  letter-spacing: -0.02em;
}

.doc p, .doc li { color: var(--muted); max-width: none; }
.doc strong { color: var(--paper); font-weight: 600; }

.doc ul { padding-left: 20px; margin: 0 0 20px; }
.doc li { margin-bottom: 9px; }

.doc a { color: var(--ember); text-decoration: none; border-bottom: 1px solid transparent; }
.doc a:hover { border-bottom-color: var(--ember); }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 15px;
}

.doc th, .doc td {
  text-align: left;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

.doc th { color: var(--paper); font-weight: 600; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  color: var(--muted);
  text-decoration: none;
}

.back:hover { color: var(--paper); }

.todo {
  display: block;
  background: var(--ember-wash);
  border-left: 1px solid var(--ember);
  padding: 14px 18px;
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: var(--measure);
}

.hidden { display: none !important; }

/* ---------------- motion ---------------- */

/* Scoped to .js so the page is fully readable if the script never runs.
   Without this, a blocked or failed motion.js leaves everything invisible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s var(--ease) var(--d, 0s),
    transform 1s var(--ease) var(--d, 0s);
}

.js [data-reveal].shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
}
