/* Marlwood log in / sign up — matches the landing page (ink and antique gold).
   Desktop (980px+): two panels — the pitch on the left, the form on the right,
   plans side by side. Tablet: slim brand band above a wide form.
   Phone (under 600px): compact header, stacked plans, Continue fixed at the bottom. */
:root {
  --ink: #100E0A; --ink-2: #17140F; --ink-3: #201C15; --line: rgba(210, 188, 133, 0.2); --line-2: rgba(244, 239, 226, 0.09);
  --cream: #F4EFE2; --cream-2: #C9C1AE; --muted: #8E8675;
  /* Gold taken from the shield: bronze shadow, honey body, champagne highlight. */
  --gold: #B0925A; --gold-2: #D2BC85; --gold-soft: rgba(176, 146, 90, 0.12);
  --metal: linear-gradient(180deg, #F0E2B6 0%, #D6BD84 18%, #B49561 46%, #8E7140 74%, #A98B56 90%, #C9AF78 100%);
  --metal-hover: linear-gradient(180deg, #F7EBC5 0%, #DEC690 18%, #BE9F6A 46%, #977A46 74%, #B29461 90%, #D3BA83 100%);
  --metal-text: linear-gradient(180deg, #F3E6BF 0%, #D8C089 38%, #B39462 62%, #D9C38E 100%);
  --metal-edge: #6E5629;
  --metal-shadow: inset 0 1px 0 rgba(255, 248, 222, .7), inset 0 -1px 0 rgba(74, 55, 22, .55), 0 1px 0 rgba(0, 0, 0, .45), 0 12px 26px -14px rgba(180, 149, 97, .6);
  --t1: #6FB39A; --bad: #E3A08A;
  --display: 'Cinzel', 'Times New Roman', serif; --body: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  /* names the older rules and inline styles still use */
  --text-primary: var(--cream); --text-secondary: var(--cream-2); --text-muted: var(--muted); --border: var(--line-2);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.auth { min-height: 100vh; background: var(--ink); color: var(--cream); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-2); text-decoration: none; cursor: pointer; }
a:hover { color: var(--cream); }
input, button { font-family: inherit; font-size: inherit; }
img { display: block; }

/* Shell */
.auth-shell { display: grid; grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth-shell.is-signup { grid-template-columns: minmax(340px, 0.7fr) minmax(0, 1.3fr); }

/* Left panel */
.auth-aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 56px; background: radial-gradient(ellipse at 20% 0%, rgba(176, 146, 90, .16), transparent 60%), var(--ink-2); border-right: 1px solid var(--line-2); overflow: hidden; }
.auth-aside::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); opacity: .45; pointer-events: none; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); }
.auth-brand b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: .28em; line-height: 1.2; }
.auth-brand small { display: block; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.auth-pitch { max-width: 460px; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.auth-eyebrow span { width: 30px; height: 1px; background: var(--gold); }
.auth-pitch h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1.12; margin-bottom: 28px; }
.auth-pitch h1 em { font-style: normal; color: var(--gold-2); }
.auth-points { list-style: none; display: grid; gap: 14px; margin-bottom: 32px; }
.auth-points li { position: relative; display: block; padding-left: 30px; color: var(--cream-2); font-size: .96rem; line-height: 1.5; }
.auth-points li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(-45deg); }
.auth-points b { display: block; color: var(--cream); font-weight: 600; margin-bottom: 2px; }
.auth-mini { border: 1px solid var(--line); border-radius: 12px; background: rgba(16, 14, 10, .6); padding: 16px 18px; transform: rotate(-1deg); max-width: 380px; }
.auth-mini-head { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: .86rem; letter-spacing: .05em; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.auth-mini-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--t1); box-shadow: 0 0 0 4px rgba(111, 179, 154, .15); }
.auth-mini dl > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: .86rem; }
.auth-mini dl > div:last-child { border-bottom: 0; }
.auth-mini dt { color: var(--muted); }
.auth-aside-foot { font-size: .84rem; color: var(--muted); }
.auth-shell.is-signup .auth-mini { display: none; }

/* Right panel */
.auth-main { display: flex; justify-content: center; align-items: flex-start; padding: 64px 48px 56px; }
.auth-card { width: 100%; max-width: 440px; animation: rise .6s .08s cubic-bezier(.2, .7, .2, 1) both; }
.auth-shell.is-signup .auth-card { max-width: 920px; }
.auth-shell.is-signup #auth-signup-form.on-details { max-width: 560px; margin: 0 auto; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth-tab-bar { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink-2); margin-bottom: 32px; max-width: 360px; }
.auth-tab { flex: 1; background: none; border: 0; color: var(--cream-2); font-weight: 600; font-size: .92rem; padding: 10px 14px; border-radius: 999px; cursor: pointer; transition: background-color .2s, color .2s; }
.auth-tab:hover { color: var(--cream); }
.auth-tab.active { color: var(--cream); background: rgba(176, 146, 90, .14); box-shadow: inset 0 0 0 1px rgba(210, 188, 133, .4); }
.auth-form-title, .signup-step-title { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: .02em; color: var(--cream); margin-bottom: 6px; }
.auth-form-sub, .signup-step-sub { color: var(--cream-2); font-size: .95rem; margin-bottom: 26px; }

/* Fields */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-label { display: block; font-size: .84rem; font-weight: 600; color: var(--cream); margin-bottom: 7px; }
.form-input { width: 100%; padding: 13px 14px; background: var(--ink-2); border: 1px solid rgba(244, 239, 226, .14); border-radius: 10px; color: var(--cream); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.form-input::placeholder { color: var(--muted); }
.form-input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }
.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 46px; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.password-toggle:hover { color: var(--cream); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle .eye-off { display: none; }
.password-toggle.revealed .eye-on { display: none; }
.password-toggle.revealed .eye-off { display: block; }

.btn-primary { width: 100%; display: inline-flex; justify-content: center; align-items: center; padding: 14px 22px; border: 0; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: opacity .2s; }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary:focus-visible, .auth-tab:focus-visible, .plan-option:focus-visible, .acct-type-option:focus-visible, .password-toggle:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.auth-switch { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--cream-2); }
.auth-switch a { font-weight: 600; }
.back-link { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-2); text-align: center; font-size: .88rem; }
.back-link a { color: var(--muted); }
.back-link a:hover { color: var(--cream); }
.auth-fine { font-size: .82rem; color: var(--cream-2); margin-top: 12px; line-height: 1.5; text-align: center; }
.muted { color: var(--muted); }

.auth-error, .auth-success { display: none; padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 20px; }
.auth-error { background: rgba(227, 160, 138, .1); border: 1px solid rgba(227, 160, 138, .4); color: var(--bad); }
.auth-success { background: rgba(111, 179, 154, .1); border: 1px solid rgba(111, 179, 154, .4); color: var(--t1); }

/* Steps */
.signup-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: .84rem; color: var(--muted); }
.signup-steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; border: 1px solid var(--line); color: var(--cream-2); }
.signup-steps .dot.active { background: rgba(176, 146, 90, .14); border-color: rgba(210, 188, 133, .6); color: var(--gold-2); }
.signup-steps .dot.active + .dot-label { color: var(--cream); }
.signup-steps .bar { flex: 0 0 40px; height: 1px; background: var(--line); }

/* Plans: side by side on desktop */
.plan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; align-items: stretch; }
.plan-option { position: relative; display: flex; flex-direction: column; text-align: left; width: 100%; padding: 22px 20px 20px; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 14px; color: var(--cream); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s, opacity .2s; }
.plan-list:has(.plan-option.active) .plan-option:not(.active) { opacity: .82; }
.plan-option:hover { border-color: var(--line); opacity: 1 !important; }
.plan-option.active { border-color: var(--gold); background: linear-gradient(180deg, #241F15, var(--ink-2)); box-shadow: 0 24px 50px -30px rgba(176, 146, 90, .45), 0 0 0 1px var(--gold);  }
.plan-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); transition: border-color .2s, box-shadow .2s; }
.plan-option.active .plan-radio { border-color: var(--gold-2); box-shadow: inset 0 0 0 4px var(--ink-2), inset 0 0 0 9px var(--gold-2); }
.plan-name { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: .04em; }
.plan-badge { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; }
.plan-price { display: block; font-family: var(--display); font-size: 1.75rem; margin: 14px 0 2px; white-space: nowrap; }
.plan-price small { font-family: var(--body); font-size: .82rem; color: var(--muted); margin-left: 3px; }
.plan-tag { display: block; color: var(--cream-2); font-size: .88rem; min-height: 2.8em; margin-bottom: 12px; }
.plan-mini { list-style: none; display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.plan-mini li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: .88rem; color: var(--cream-2); }
.plan-mini li::before { content: ''; width: 10px; height: 6px; margin-top: 7px; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(-45deg); }
.signup-continue-bar { max-width: 360px; margin: 0 auto; }

/* Details step */
.signup-back { background: none; border: 0; color: var(--muted); font-size: .88rem; cursor: pointer; margin-bottom: 14px; }
.signup-back:hover { color: var(--cream); }
.signup-plan-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--gold-soft); margin-bottom: 22px; font-size: .92rem; }
.signup-plan-summary strong { color: var(--gold-2); }
.acct-type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acct-type-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 10px; color: var(--cream); cursor: pointer; text-align: left; transition: border-color .2s; }
.acct-type-option:hover { border-color: var(--line); }
.acct-type-option.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.acct-type-title { font-weight: 700; font-size: .94rem; }
.acct-type-sub { font-size: .8rem; color: var(--muted); }
.terms-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 20px; font-size: .88rem; color: var(--cream-2); }
.terms-row input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--gold); flex: none; }

/* Tablet: slim brand band, wide form */
/* Gold buttons — the quiet style used everywhere: a hairline metal edge,
   champagne lettering and a faint warm tint at rest; the metal fill fades in
   on hover. No sweep, no lift. */
.lp-btn-gold, .lp-btn-quiet, .btn-primary {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--gold-2); border: 1px solid transparent; text-shadow: none; box-shadow: none;
  background: linear-gradient(rgba(176, 146, 90, .1), rgba(176, 146, 90, .1)) padding-box, linear-gradient(var(--ink-2), var(--ink-2)) padding-box, var(--metal) border-box;
  font-weight: 600; letter-spacing: .03em;
  transition: color .35s ease, box-shadow .35s ease;
}
.lp-btn-gold::before, .lp-btn-quiet::before, .btn-primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--metal); opacity: 0; transition: opacity .35s ease;
}
.lp-btn-gold:hover, .lp-btn-quiet:hover, .btn-primary:hover { color: #1A140A; box-shadow: 0 10px 22px -16px rgba(176, 146, 90, .55); transform: none; }
.lp-btn-gold:hover::before, .lp-btn-quiet:hover::before, .btn-primary:hover::before { opacity: 1; }
.lp-btn-gold:active, .lp-btn-quiet:active, .btn-primary:active { transform: none; box-shadow: none; }
.btn-primary:disabled { color: var(--gold-2); }
.btn-primary:disabled::before { opacity: 0; }
.lp-plan-flag { background: var(--ink); color: var(--gold-2); border: 1px solid rgba(210, 188, 133, .5); }
.lp-metal-text, h1 em, .lp-price, .lp-num, .plan-price, .auth-pitch h1 em {
  background: var(--metal-text); -webkit-background-clip: text; background-clip: text; color: var(--gold-2); -webkit-text-fill-color: transparent;
}
.lp-price span, .plan-price small { -webkit-text-fill-color: var(--muted); }

/* Log in and password reset: a framed card, centred in the panel */
.auth-main { align-items: center; }
.auth-shell.is-signup .auth-main { align-items: flex-start; }
.auth-shell:not(.is-signup) .auth-card { padding: 36px 36px 28px; border: 1px solid var(--line-2); border-radius: 16px; background: linear-gradient(180deg, rgba(32, 28, 21, .7), rgba(23, 20, 15, .7)); box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .8); }
.auth-shell:not(.is-signup) .auth-tab-bar { max-width: none; margin-bottom: 28px; }
.form-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.form-label-link { font-size: .82rem; color: var(--muted); }
.form-label-link:hover { color: var(--gold-2); }
#auth-login-form .btn-primary, #auth-forgot-form .btn-primary { margin-top: 6px; }
.auth-shell:not(.is-signup) .back-link { margin-top: 24px; padding-top: 18px; }

@media (max-width: 980px) {
  .auth-shell, .auth-shell.is-signup { grid-template-columns: 1fr; }
  .auth-aside { position: relative; height: auto; padding: 22px 32px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .auth-aside::after, .auth-pitch .auth-points, .auth-mini, .auth-eyebrow { display: none; }
  .auth-pitch { display: none; }
  .auth-aside-foot { text-align: right; max-width: 260px; }
  .auth-main { padding: 40px 32px 56px; }
  .plan-list { grid-template-columns: 1fr 1fr; }
  .plan-option.plan-featured { grid-column: 1 / -1; order: -1; }
}

/* Phone: compact, thumb-first */
@media (max-width: 600px) {
  .auth-aside { padding: 14px 18px; }
  .auth-brand img { width: 26px; height: 32px; }
  .auth-brand b { font-size: .96rem; letter-spacing: .22em; }
  .auth-aside-foot { display: none; }
  .auth-main { padding: 24px 18px 40px; align-items: flex-start; }
  .auth-shell:not(.is-signup) .auth-card { padding: 24px 20px 20px; border-radius: 14px; }
  .auth-tab-bar { max-width: none; margin-bottom: 24px; }
  .auth-form-title, .signup-step-title { font-size: 1.35rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-input { font-size: 16px; }
  .plan-list { grid-template-columns: 1fr; gap: 12px; }
  .plan-option { padding: 16px; transform: none !important; }
  .plan-top { flex-wrap: nowrap; }
  .plan-price { position: absolute; top: 14px; right: 16px; margin: 0; font-size: 1.2rem; }
  .plan-tag { min-height: 0; margin: 6px 0 0 28px; font-size: .86rem; }
  .plan-mini { display: none; margin-left: 28px; }
  .plan-option.active .plan-mini { display: grid; margin-top: 12px; }
  #signup-step-1 { padding-bottom: 84px; }
  .signup-continue-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-width: none; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: rgba(16, 14, 10, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); }
  .signup-steps .dot-label { display: none; }
  .signup-steps .dot.active + .dot-label { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
