@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  font-family: "DM Sans", sans-serif;
  color: #17334a;
  background: #f4efdf;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #15354d;
  --navy-deep: #102c42;
  --cream: #f4efdf;
  --paper: #fffdf8;
  --sand: #e9dfc8;
  --gold: #cba96b;
  --muted: #6c7b80;
  --line: #e7e1d4;
  --error: #a43838;
  --success: #2d7054;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--cream);
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
[hidden] { display: none !important; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, .92fr) minmax(430px, 1.08fr);
  padding: 18px;
  gap: 18px;
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: calc(100vh - 36px);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(30px, 5vw, 64px);
  border-radius: 22px;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 83% 82%, rgba(203, 169, 107, .2), transparent 39%),
    linear-gradient(148deg, #1f4962 0%, var(--navy) 44%, #102b40 100%);
}

.brand-panel::before, .brand-panel::after {
  position: absolute;
  z-index: 0;
  content: "";
  border: 1px solid rgba(244, 239, 223, .14);
  border-radius: 50%;
  pointer-events: none;
}

.brand-panel::before { width: 390px; height: 390px; right: -195px; bottom: 5%; }
.brand-panel::after { width: 270px; height: 270px; right: -135px; bottom: calc(5% + 60px); }
.brand-panel > * { position: relative; z-index: 1; }

.brand-lockup { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(244, 239, 223, .5);
  border-radius: 14px;
  color: var(--cream);
}
.brand-mark svg { width: 29px; height: 29px; }
.brand-name { display: block; font: 600 24px/1 "Playfair Display", Georgia, serif; letter-spacing: .02em; }
.brand-caption { display: block; margin-top: 5px; color: rgba(244, 239, 223, .7); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }

.brand-copy { max-width: 500px; margin: 50px 0 62px; }
.eyebrow { margin: 0 0 17px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.brand-copy h1 { max-width: 440px; margin: 0; font: 500 clamp(42px, 5.4vw, 72px)/1.08 "Playfair Display", Georgia, serif; letter-spacing: -.035em; }
.brand-copy p { max-width: 370px; margin: 24px 0 0; color: rgba(244, 239, 223, .78); font-size: 15px; line-height: 1.8; }
.brand-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: rgba(244, 239, 223, .6); font-size: 11px; letter-spacing: .04em; }
.brand-footer span:last-child { color: var(--gold); font-weight: 600; }

.content-panel { display: grid; place-items: center; padding: clamp(20px, 5vw, 72px); }
.auth-card { width: min(100%, 440px); }
.mobile-brand { display: none; }
.card-kicker { margin: 0 0 12px; color: #9c8152; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.auth-card h2 { margin: 0; color: var(--navy-deep); font: 600 clamp(30px, 3vw, 40px)/1.15 "Playfair Display", Georgia, serif; letter-spacing: -.025em; }
.card-description { margin: 12px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  margin-bottom: 27px;
  border: 1px solid #e3dccb;
  border-radius: 12px;
  background: rgba(255, 253, 248, .55);
}
.mode-switch button { min-height: 42px; border: 0; border-radius: 8px; color: #66777c; background: transparent; font-size: 13px; font-weight: 600; transition: color .2s, background .2s, box-shadow .2s; }
.mode-switch button.is-active { color: var(--navy); background: var(--paper); box-shadow: 0 2px 8px rgba(28, 49, 56, .08); }

.field { display: block; margin: 0 0 18px; }
.field span { display: block; margin-bottom: 8px; color: #344d5b; font-size: 12px; font-weight: 700; }
.field input { width: 100%; height: 52px; padding: 0 15px; border: 1px solid #ded9cd; border-radius: 9px; outline: none; color: #19374a; background: var(--paper); font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder { color: #a2aaa6; }
.field input:focus { border-color: #50748a; box-shadow: 0 0 0 3px rgba(39, 86, 111, .12); }

.primary-button { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; border: 1px solid var(--navy); border-radius: 9px; color: var(--cream); background: var(--navy); font-size: 14px; font-weight: 700; transition: background .2s, transform .2s; }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: #204961; }
.primary-button:focus-visible, .mode-switch button:focus-visible, .text-button:focus-visible { outline: 3px solid rgba(39, 86, 111, .25); outline-offset: 3px; }
.primary-button.is-loading { opacity: .7; }
.form-note { margin: 19px 0 0; color: #8a9695; font-size: 11px; line-height: 1.6; text-align: center; }

.notice { padding: 12px 13px; margin: 0 0 18px; border: 1px solid #dfd5bd; border-radius: 9px; color: #61563e; background: #f7f0df; font-size: 12px; line-height: 1.55; }
.notice[data-kind="error"] { border-color: #edcaca; color: var(--error); background: #fff2f0; }
.notice[data-kind="success"] { border-color: #cce2d5; color: var(--success); background: #edf7f0; }

.signed-in-card { padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 18px 55px rgba(34, 53, 56, .07); }
.signed-in-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 25px; border-radius: 50%; color: var(--success); background: #e7f2e9; }
.signed-in-icon svg { width: 23px; height: 23px; }
.login-summary { padding: 14px 15px; margin: 25px 0 20px; border-radius: 9px; background: #f4f0e5; }
.login-summary span { display: block; margin-bottom: 5px; color: #7f8b88; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.login-summary strong { color: var(--navy); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.text-button { display: block; padding: 10px; margin: 8px auto 0; border: 0; color: #60767e; background: transparent; font-size: 12px; font-weight: 600; }

@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(270px, .85fr) minmax(370px, 1.15fr); gap: 12px; padding: 12px; }
  .brand-panel { min-height: calc(100vh - 24px); padding: 30px; }
  .content-panel { padding: 30px; }
}

@media (max-width: 640px) {
  .app-shell { min-height: 100vh; display: block; padding: 0; }
  .brand-panel { display: none; }
  .content-panel { display: block; min-height: 100vh; padding: 28px 22px 40px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(64px, 16vh, 125px); color: var(--navy); }
  .mobile-brand .brand-mark { width: 40px; height: 40px; border-color: rgba(21, 53, 77, .28); color: var(--navy); }
  .mobile-brand .brand-mark svg { width: 25px; height: 25px; }
  .mobile-brand .brand-name { font-size: 22px; }
  .mobile-brand .brand-caption { color: #788783; font-size: 9px; }
  .auth-card { width: min(100%, 440px); margin: 0 auto; }
  .auth-card h2 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
