/* ═══════════════════════════════════════════════════════════════
   Simone Grace Seol — Auth Shell Stylesheet (login.html / verify.html)
   Matches the main "Seowon" site system (styles.css): hanji paper,
   Manrope, her handwritten "Simone Sharper" mark. Deliberately
   NOT Joyful Marketing branded — this gate serves every offer, not
   just one course. No hanja glyphs / dojang seal (members-area rule).
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'Simone Sharper';
  src: url('/assets/SimoneSharper-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --hanji:        oklch(97.2% 0.012 85);
  --hanji-fold:   oklch(94%   0.018 82);
  --ink:          oklch(22%   0.01  60);
  --ink-60:       oklch(22%   0.01  60 / 0.62);
  --ink-30:       oklch(22%   0.01  60 / 0.30);
  --ink-15:       oklch(22%   0.01  60 / 0.15);

  --jade:         oklch(58%   0.10  165);
  --fuchsia:      oklch(60%   0.22  352);
  --fuchsia-deep: oklch(46%   0.19  355);

  --font-serif: 'Manrope', sans-serif;
  --font-hand:  'Simone Sharper', 'Manrope', sans-serif;

  /* darker fuchsia for body-size text (error/link) — the display
     fuchsia reads fine large, but small text needs more contrast
     against the hanji paper to clear 4.5:1 */
  --accent-text: oklch(43% 0.19 352);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background: url('/assets/hanji.webp') var(--hanji);
  background-size: 1600px auto;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--hanji) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hanji-fold);
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px max(24px, 4vw);
}
.brand {
  font-family: var(--font-hand);
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand em { color: var(--fuchsia); font-style: normal; }

/* ── Layout: portrait + card side by side ───────────────────────── */
.au-wrap {
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
}
.au-shell {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 340px 1fr;
  align-items: stretch;
  background: color-mix(in srgb, var(--hanji) 45%, #fff);
  border: 1px solid var(--hanji-fold);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  overflow: hidden;
}
.au-portrait {
  margin: 0;
  position: relative;
  min-height: 100%;
  overflow: hidden;
}
/* Two photos share this frame: the sign-in shot and a different one
   shown once she's submitted her email (the "check your inbox" state).
   Only one is ever visible -- toggled by JS adding/removing .is-active
   in members/login.html -- so only one image loads visibly at a time. */
.au-portrait img {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}
.au-portrait img.is-active { display: block; }
/* Source photo isn't centered on Simone (she sits ~65% across the
   frame, with a blurred pillar on the left) -- 95% horizontal crops
   out most of that dead space so she reads as centered in the card. */
#au-portrait-request { object-position: 95% 50%; }
/* Couch photo: she sits closer to center-left, so a lighter shift
   (~38%) centers her instead of the far-right crop the other photo needs.
   It's also a wider full-body shot, so a 1.4x zoom (transform, not
   object-fit -- object-position can't scale) crops in tighter on her
   instead of showing so much couch/kitchen; .au-shell above clips the
   overflow this creates. */
#au-portrait-sent { object-position: 38% 50%; transform: scale(1.4); transform-origin: 45% 35%; }

/* ── Card (.au-*) ─────────────────────────────────────────────── */
.au-card {
  padding: 52px clamp(28px, 5vw, 52px) 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.au-card h1 {
  font-family: var(--font-hand); font-weight: 400;
  font-size: clamp(46px, 7vw, 62px); line-height: 0.95;
  color: var(--ink); margin: 0;
}
.au-card h1 em { color: var(--fuchsia); font-style: normal; }

.lede {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 19px; line-height: 1.5; color: var(--ink);
  margin: 18px 0 14px;
}
.oracle-note {
  font-family: var(--font-serif); font-style: italic;
  font-size: 17px; line-height: 1.55; color: var(--ink-60);
  margin: 0 0 18px;
}
.oracle-note em { color: var(--fuchsia-deep); font-style: italic; }
.members-note {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 14.5px; line-height: 1.55; color: var(--ink-60);
  margin: 0 0 28px;
  padding-top: 18px;
  border-top: 1px solid var(--hanji-fold);
}

form { display: flex; flex-direction: column; gap: 8px; }
label {
  font-family: var(--font-serif);
  text-transform: uppercase;
  font-size: 15px; letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 600;
}
.field {
  display: flex; align-items: center; gap: 12px;
  border: none; border-bottom: 2px solid var(--ink-30);
  background: transparent; padding: 8px 2px 12px; transition: border-color .2s;
}
.field:focus-within { border-bottom-color: var(--fuchsia); }
.field input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: var(--font-serif); font-weight: 400; font-size: 18px; color: var(--ink); padding: 0;
}
.field input::placeholder { color: var(--ink-30); font-family: var(--font-serif); }

.btn {
  align-self: flex-start; margin-top: 26px;
  font-family: var(--font-serif); font-weight: 600;
  font-size: 16px; letter-spacing: 0.01em;
  background: var(--fuchsia); color: #fff8ee; border: none;
  border-radius: 100px; padding: 15px 30px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  transition: transform .15s ease, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--fuchsia-deep); box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--fuchsia) 55%, transparent); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.au-msg { margin-top: 18px; font-family: var(--font-serif); font-size: 15px; line-height: 1.5; min-height: 20px; }
.au-msg.is-err { color: var(--accent-text); }
.au-msg.is-ok { color: var(--jade); }

/* Sent-confirmation state */
.au-sent { display: none; }
.au-sent.is-show { display: block; }
.linkbtn {
  background: none; border: none; color: var(--accent-text);
  font-family: var(--font-serif); font-size: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; padding: 0;
}

/* ── Signature sign-off ──────────────────────────────────────── */
.au-signoff {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}
.au-signoff img {
  width: 130px;
  height: auto;
  opacity: 0.82;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .au-shell { grid-template-columns: 1fr; max-width: 480px; }
  /* On mobile the crop goes short/wide instead of narrow/tall, so the
     full image width shows (horizontal position stops mattering) but
     the top/bottom crop needs to shift up to keep her face in frame.
     Each photo frames her face at a different height, so each needs
     its own vertical position -- see the desktop rules above for why
     there are two images at all. */
  .au-portrait img { min-height: 260px; }
  #au-portrait-request { object-position: 50% 15%; }
  #au-portrait-sent { object-position: 50% 27%; }
  .au-card { padding: 40px 26px 40px; }
}

/* ── Accessibility ───────────────────────────────────────────── */
.field input:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 4px; }
.btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.linkbtn:focus-visible,
.brand:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ── Verify Token Card (.vf-*) — kept for verify.html ───────────── */
.vf-wrap { display: flex; align-items: center; justify-content: center; padding: 72px 20px 56px; }
.vf-card {
  width: 100%; max-width: 440px;
  background: color-mix(in srgb, var(--hanji) 45%, #fff); border: 1px solid var(--hanji-fold);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06); padding: 48px 40px; text-align: center;
}
.vf-card h1 { font-family: var(--font-hand); font-weight: 400; font-size: clamp(38px, 9vw, 48px); line-height: 0.95; margin: 0 0 10px; }
.vf-card p { font-family: var(--font-serif); color: var(--ink-60); font-size: 15px; line-height: 1.6; margin: 0; }
.vf-spinner {
  width: 26px; height: 26px; margin: 6px auto 0; border-radius: 50%;
  border: 3px solid var(--ink-15); border-top-color: var(--fuchsia); animation: vf-spin 0.8s linear infinite;
}
@keyframes vf-spin { to { transform: rotate(360deg); } }
.vf-btn {
  display: inline-block; margin-top: 22px;
  font-family: var(--font-serif); font-weight: 600; font-size: 16px; letter-spacing: 0.05em;
  background: var(--fuchsia); color: #fff; border: 1px solid transparent;
  border-radius: 100px; padding: 12px 28px; cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--fuchsia) 75%, transparent);
}
.vf-btn:hover { filter: brightness(0.96); background: var(--fuchsia); }
.vf-err h1 { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .vf-spinner { animation: none; }
}

/* ── Copyright footer (shared: login.html, verify.html) ─────────── */
.site-copyright {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--ink-30);
  padding: 40px 20px 32px;
}
