/* Gilded Creators · Recipe R6 Emerald Reserve (AGENCY_SITE_GUIDE.md §7)
   Deep green, champagne hairlines, Playfair Display + Karla. Quiet, centered, classical. */

:root {
  --bg: #0A1A14;
  --surface: #0F241C;
  --surface-2: #132C23;
  --text: #F1EFE6;
  --muted: #A3B1A8;
  --gold: #D9C08C;
  --gold-soft: rgba(217, 192, 140, .55);
  --line: rgba(217, 192, 140, .26);
  --line-faint: rgba(217, 192, 140, .14);
  --green: #2F8F6B;
  --error: #F2A38F;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 6px;
  --gutter: clamp(16px, 5vw, 32px);
  --max: 1120px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

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

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-weight: 700; }
.skip:focus { top: 12px; }

.label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Buttons: outlined champagne, fill on hover. Solid for the main action. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: transparent;
  color: var(--gold);
  font: 700 15px/1 var(--sans);
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--gold); color: var(--bg); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 0 36px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--gold); color: var(--bg); }
  .btn--solid:hover { background: #E6D2A6; }
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 26, 20, .94);
  border-bottom: 1px solid var(--line-faint);
  padding-top: env(safe-area-inset-top);
}
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand__crest { width: 30px; height: 35px; color: var(--gold); flex: none; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: .01em; white-space: nowrap; }
.top__end { display: flex; align-items: center; gap: 6px; flex: none; }
.top__menu {
  min-height: 44px;
  padding: 0 10px;
  background: none;
  border: 0;
  color: var(--text);
  font: 500 15px/1 var(--sans);
  letter-spacing: .04em;
  cursor: pointer;
  touch-action: manipulation;
}

.nav {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
  padding: 12px var(--gutter) 24px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
}
.top.is-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
.nav a:not(.btn) {
  display: block;
  padding: 14px 0;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-faint);
}
.nav__apply { display: none; }

@media (min-width: 1024px) {
  .top__row { display: grid; grid-template-columns: 1fr auto 1fr; height: 80px; }
  .brand { grid-column: 2; grid-row: 1; flex-direction: column; gap: 4px; }
  .brand__crest { width: 26px; height: 30px; }
  .brand__name { font-size: 17px; letter-spacing: .04em; }
  .top__end { display: none; }
  .top__end--legal { display: flex; grid-column: 3; grid-row: 1; justify-self: end; }
  .nav { display: contents; visibility: visible; opacity: 1; transform: none; transition: none; }
  .nav__group { display: flex; align-items: center; gap: 32px; grid-row: 1; }
  .nav__group--l { grid-column: 1; justify-self: start; }
  .nav__group--r { grid-column: 3; justify-self: end; }
  .nav a:not(.btn) {
    padding: 8px 0;
    border: 0;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--muted);
    transition: color 160ms var(--ease-out);
  }
  .nav__apply { display: inline-flex; }
  .nav a[aria-current="true"] { color: var(--text); }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { color: var(--text); }
}

/* Hero: type only, inside a thin champagne frame */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(56px, 9vw, 112px); }
.hero__frame {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 104px) clamp(20px, 6vw, 96px) clamp(44px, 8vw, 88px);
  border: 1px solid var(--gold-soft);
  outline: 1px solid var(--line-faint);
  outline-offset: -9px;
  border-radius: var(--radius);
  text-align: center;
}
.hero__frame::before {
  /* small diamond sitting on the top rule */
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 11px; height: 11px;
  margin-left: -5.5px;
  background: var(--bg);
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.hero h1 {
  margin: 22px auto 0;
  max-width: 15ch;
  font-size: clamp(2.35rem, 9.6vw, 4.6rem);
  line-height: 1.06;
}
.hero__lead {
  margin: 24px auto 0;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
}
.hero__actions { margin-top: 36px; display: flex; flex-direction: column; gap: 12px; }
.hero__note { margin-top: 28px; font-size: 14.5px; color: var(--muted); }
@media (min-width: 640px) {
  .hero__actions { flex-direction: row; justify-content: center; }
}

/* One entrance on load. Nothing on scroll. */
.js .hero__in { animation: rise 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section--rule { border-top: 1px solid var(--line-faint); }
.head { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); }
.head h2 { font-size: clamp(2rem, 7.6vw, 3.1rem); }
.head p { margin-top: 14px; color: var(--muted); }
.head::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  margin: 0 auto 26px;
  background: var(--gold);
}

/* Ledger: two columns */
.ledger { display: grid; gap: 48px; max-width: 1040px; margin: 0 auto; }
.ledger__title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gold-soft);
}
.ledger__list { list-style: none; margin: 0; padding: 0; }
.ledger__list li { padding: 18px 0; border-bottom: 1px solid var(--line-faint); }
.ledger__list strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.3; }
.ledger__list span { display: block; margin-top: 4px; color: var(--muted); font-size: 16px; line-height: 1.6; }
@media (min-width: 860px) {
  .ledger { grid-template-columns: 1fr 1fr; gap: 0; }
  .ledger__col:first-child { padding-right: clamp(32px, 4vw, 64px); border-right: 1px solid var(--line); }
  .ledger__col:last-child { padding-left: clamp(32px, 4vw, 64px); }
  .ledger__col:first-child .ledger__list li { text-align: right; }
}

/* Process: roman numerals */
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; padding-bottom: 36px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: '';
  position: absolute;
  left: 27.5px; top: 56px; bottom: 8px;
  width: 1px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step__no {
  grid-row: span 2;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--gold);
  letter-spacing: .04em;
}
.step h3 { font-size: 23px; padding-top: 12px; }
.step p { margin-top: 6px; color: var(--muted); font-size: 16px; }
@media (min-width: 900px) {
  .steps { max-width: 1120px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .step { display: block; text-align: center; padding: 0; }
  .step::before { left: calc(50% + 44px); right: calc(-50% - 32px + 44px); top: 31px; bottom: auto; width: auto; height: 1px; }
  .step__no { width: 62px; height: 62px; margin: 0 auto 22px; font-size: 22px; }
  .step h3 { padding-top: 0; }
  .step p { margin: 10px auto 0; max-width: 24em; }
}

/* Standing terms panel */
.terms {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px clamp(18px, 5vw, 44px) 30px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.terms__list { margin: 0; }
.terms__list > div { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; }
.terms__list > div + div { border-top: 1px solid var(--line-faint); }
.terms__list dt { flex: 1 0 auto; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 15px; letter-spacing: .02em; }
.terms__list dt::after { content: ''; flex: 1; min-width: 16px; border-bottom: 1px dotted var(--gold-soft); transform: translateY(-4px); }
.terms__list dd { margin: 0; max-width: 58%; text-align: right; font-family: var(--serif); font-size: 17.5px; line-height: 1.4; }
.terms__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 14.5px; color: var(--muted); }
@media (max-width: 420px) {
  .terms__list > div { display: block; }
  .terms__list dt { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
  .terms__list dt::after { display: none; }
  .terms__list dd { max-width: none; text-align: left; margin-top: 2px; }
}

/* Questions: definition list, always open */
.faq { margin: 0 auto; max-width: 960px; }
.faq > div { padding: 22px 0; border-bottom: 1px solid var(--line-faint); }
.faq > div:first-child { border-top: 1px solid var(--line); }
.faq dt { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.3; }
.faq dd { margin: 8px 0 0; color: var(--muted); }
@media (min-width: 860px) {
  .faq > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px; padding: 28px 0; }
  .faq dd { margin: 0; padding-top: 2px; }
}

/* Apply */
.form {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form__grid { display: grid; gap: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 14.5px; font-weight: 500; letter-spacing: .02em; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid rgba(241, 239, 230, .18);
  border-radius: var(--radius);
  color: var(--text);
  font: 16px/1.4 var(--sans);
  transition: border-color 160ms var(--ease-out);
}
.field textarea { resize: vertical; min-height: 96px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.field select:invalid { color: var(--muted); }
.field option { color: #111; }
.field input::placeholder { color: rgba(163, 177, 168, .7); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 192, 140, .18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.tel { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
@media (min-width: 680px) {
  .form__grid { grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .field--wide { grid-column: 1 / -1; }
}

.checks { margin-top: 22px; display: grid; gap: 6px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 15.5px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--gold); }
.check.is-invalid span { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__error { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--error); border-radius: var(--radius); color: var(--error); font-size: 15px; }
.form__submit { margin-top: 24px; display: grid; gap: 12px; text-align: center; }
.form__submit p { font-size: 14px; color: var(--muted); }
@media (min-width: 680px) {
  .form__submit { justify-items: center; }
}
.form.is-sent .form__grid, .form.is-sent .checks, .form.is-sent .form__submit, .form.is-sent .form__error { display: none; }
.form__done { text-align: center; padding: 24px 0; animation: rise 400ms var(--ease-out) both; }
.form__done svg { width: 44px; height: 52px; margin: 0 auto 18px; color: var(--gold); }
.form__done h3 { font-size: 28px; }
.form__done p { margin-top: 10px; color: var(--muted); }
.form__done:focus { outline: none; }
.apply__alt { margin-top: 24px; text-align: center; color: var(--muted); font-size: 15.5px; overflow-wrap: anywhere; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); text-align: center; }
.foot__crest { width: 40px; height: 47px; margin: 0 auto; color: var(--gold); }
.foot__name { margin-top: 14px; font-family: var(--serif); font-weight: 600; font-size: 24px; }
.foot__line { margin-top: 4px; color: var(--muted); font-size: 15px; }
.foot__nav { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.foot__nav a, .foot__contact a { display: inline-block; padding: 10px 0; color: var(--text); text-decoration: none; font-size: 15px; }
.foot__contact { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.foot__contact a { color: var(--gold); }
.foot__legal { margin: 32px auto 0; padding-top: 24px; border-top: 1px solid var(--line-faint); max-width: 680px; font-size: 13.5px; line-height: 1.7; color: var(--muted); display: grid; gap: 10px; }
.foot__legal a { color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .foot__nav a:hover { color: var(--gold); }
}

/* Legal pages and 404 */
.legal { padding: clamp(48px, 8vw, 96px) 0; }
.legal__body { max-width: 720px; }
.legal h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); text-align: center; }
.legal .updated { margin-top: 10px; text-align: center; color: var(--muted); font-size: 14.5px; }
.legal .updated::after { content: ''; display: block; width: 40px; height: 1px; margin: 28px auto 8px; background: var(--gold); }
.legal h2 { margin-top: 40px; font-size: 24px; }
.legal p, .legal ul { margin-top: 14px; color: #D9DCD2; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.lost { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 40px var(--gutter); text-align: center; }
.lost svg { width: 48px; height: 56px; color: var(--gold); }
.lost h1 { font-size: clamp(3rem, 14vw, 5rem); }
.lost p { max-width: 30em; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
  .nav, .top.is-open .nav { transform: none; }
  .btn:active { transform: none; }
}
