/* Item 32b: "bring it into focus" sign-in for Ada, in arthurdiamond.com's design language.
   Self-hosted OFL fonts (licences in /fonts), the real Arthur Diamond logo inlined in the view, no JS, no external requests.
   Only the /login view loads this file. */
@font-face {
  font-family: "ADA Playfair";
  src: url("/fonts/playfair-display-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
/* the logo's own <text> asks for 'Playfair Display'; serve it the same self-hosted file so the lockup renders as designed */
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ADA Inter";
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1e2d4a;
  --navy-light: #2a3f66;
  --navy-deep: #0d1827;
  --gold: #d0aa48;
  --gold-dark: #b69030;
  --gold-hover: #d8b458;
  --ivory: #f7f4ef;
  --text: #1c2535;
  --border: #edeae2;
  --input: #ddd6cc;
  --serif: "ADA Playfair", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "ADA Inter", Inter, system-ui, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lens: min(80vh, 46vw, 760px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.focus-body {
  min-height: 100vh;
  min-height: 100dvh;
  font: 16px/1.6 var(--sans);
  letter-spacing: 0.01em;
  color: var(--ivory);
  /* a deeper take on the site's hero gradient */
  background: linear-gradient(150deg, #050b15 0%, #08111e 22%, #111a2f 58%, #1a2843 100%) fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}
/* the site's 1px gold line across the very top, fading at both ends */
.focus-body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 1px;
  z-index: 3;
  background: linear-gradient(90deg, rgba(208, 170, 72, 0) 0%, rgba(208, 170, 72, 0.6) 50%, rgba(208, 170, 72, 0) 100%);
}

/* ---- the navy field: fine crosshatch that starts out of focus and sharpens */
.field {
  position: fixed;
  inset: -40px;
  pointer-events: none;
  background:
    repeating-linear-gradient(135deg, rgba(247, 244, 239, 0.03) 0 1px, transparent 1px 23px),
    repeating-linear-gradient(45deg, rgba(247, 244, 239, 0.018) 0 1px, transparent 1px 46px);
  animation: ada-focus 1.2s ease-out both;
}
@keyframes ada-focus {
  from { filter: blur(14px); opacity: 0.35; }
  to { filter: blur(0); opacity: 1; }
}

/* ---- brand lockup, top left (the real logo, unaltered) */
.brand {
  position: absolute;
  top: clamp(18px, 3.4vh, 34px);
  left: clamp(20px, 3vw, 44px);
  z-index: 2;
  line-height: 0;
}
/* item 32c: the full lockup at ~1.5x (was clamp(26px, 4vh, 38px)); keeps the 951:152 viewBox, so proportions hold */
.brand-logo { display: block; height: clamp(30px, 6vh, 57px); width: auto; }

/* ---- stage: lens on the left, tagline + card anchored to its rim on the right */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 9vh, 92px) clamp(20px, 4vw, 64px) clamp(24px, 4vh, 48px);
  overflow: clip;
}

.lens {
  position: relative;
  flex: 0 0 auto;
  width: var(--lens);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
/* concentric rings radiating from the focal point, blurred at first like the field */
.lens::before {
  content: "";
  position: absolute;
  inset: -80%;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(247, 244, 239, 0.045) 0 1px, transparent 1px 28px);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 22%, transparent 62%);
  mask-image: radial-gradient(circle at 50% 50%, #000 22%, transparent 62%);
  animation: ada-focus 1.2s ease-out both;
}
/* inside the glass: already sharp, a touch brighter, with a soft gold glow at the focal point */
.lens-glass {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(208, 170, 72, 0.12) 0%, rgba(208, 170, 72, 0.04) 34%, transparent 62%),
    repeating-radial-gradient(circle at 50% 50%, rgba(247, 244, 239, 0.07) 0 1px, transparent 1px 28px),
    radial-gradient(circle at 50% 42%, rgba(42, 63, 102, 0.55) 0%, rgba(13, 24, 39, 0.35) 70%);
  box-shadow: inset 0 0 80px rgba(5, 11, 21, 0.65), 0 0 120px rgba(208, 170, 72, 0.06);
}

.lens-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: ada-ring-in 1.2s ease-out both; }
.lens-ring circle, .lens-ring path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.ring-outer { stroke: rgba(247, 244, 239, 0.14); stroke-width: 1; }
.tick { stroke: rgba(247, 244, 239, 0.22); stroke-width: 1; }
.tick-major { stroke: rgba(208, 170, 72, 0.75); stroke-width: 1.5; }
.ring-rim { stroke: rgba(247, 244, 239, 0.3); stroke-width: 1.5; }
.ring-gold { stroke: var(--gold); stroke-width: 4; }
.ring-arc { stroke: rgba(208, 170, 72, 0.4); stroke-width: 1; }
.ring-arc-in { stroke: rgba(208, 170, 72, 0.3); }
.ring-inner { stroke: rgba(208, 170, 72, 0.3); stroke-width: 1; }
.ring-cross { stroke: rgba(247, 244, 239, 0.28); stroke-width: 1; }
/* the outer tick ring turns, very slowly */
.ring-spin { transform-box: view-box; transform-origin: 50% 50%; animation: ada-spin 240s linear infinite; }
@keyframes ada-spin { to { transform: rotate(360deg); } }
@keyframes ada-ring-in {
  from { opacity: 0.4; transform: scale(1.05); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.lens-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12%;
}
.emblem { display: block; width: clamp(44px, 8.6vh, 78px); height: auto; margin-bottom: clamp(4px, 1.2vh, 12px); }

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(64px, calc(var(--lens) * 0.24), 168px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ivory);
  text-shadow: 0 0 60px rgba(208, 170, 72, 0.1);
}

/* pronunciation under Ada; this rule has no text-transform, so the IPA stays \ˈā-də\ */
.say {
  margin: clamp(6px, 1.2vh, 12px) 0 0;
  font-size: clamp(14px, 2vh, 18px);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: #d1d5db;
}
.say .stress { font-weight: 700; color: var(--gold); }

.welcome-line {
  margin: clamp(8px, 1.8vh, 18px) 0 0;
  font-weight: 300;
  font-size: clamp(15px, 2.3vh, 21px);
  line-height: 1.45;
  color: var(--ivory);
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: clamp(8px, 1.8vh, 18px) 0 0;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: none;
  color: var(--gold);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 32px; height: 1px; background: linear-gradient(90deg, rgba(208, 170, 72, 0), rgba(208, 170, 72, 0.7)); }
.eyebrow::after { transform: scaleX(-1); }

/* ---- right column, overlapping the lens rim */
.side {
  position: relative;
  flex: 0 1 auto;
  width: min(500px, 40vw);
  margin-left: calc(var(--lens) * -0.07);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.lens-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, min(6.6vh, 4.2vw), 68px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ivory);
}
.lens-line span { display: block; color: var(--gold); }
/* the tagline starts just outside the rim; only the card overlaps the lens */
.side > .lens-line, .side > .hairline { margin-left: calc(var(--lens) * 0.07); }

.hairline {
  display: block;
  width: 72%;
  height: 1px;
  margin: clamp(12px, 2.6vh, 26px) 0;
  background: linear-gradient(90deg, rgba(208, 170, 72, 0.75) 0%, rgba(208, 170, 72, 0) 100%);
}

/* ---- sign-in card: ivory glass; all small text navy */
.login-card {
  width: min(420px, 100%);
  text-align: left;
  color: var(--text);
  background: rgba(247, 244, 239, 0.97);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: clamp(16px, 3vh, 30px) clamp(20px, 2.4vw, 32px) clamp(18px, 3vh, 30px);
  box-shadow: 0 30px 80px rgba(3, 8, 16, 0.55), 0 0 0 1px rgba(208, 170, 72, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  position: relative;
}
@supports (backdrop-filter: blur(1px)) {
  .login-card { backdrop-filter: blur(12px); }
}
.login-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}
.login-card h2 {
  margin: 0 0 clamp(6px, 1.4vh, 14px);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.login-card form { display: grid; gap: 6px; }
.login-card label {
  margin-top: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.login-card input {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 3px;
  padding: clamp(9px, 1.5vh, 13px) 16px;
  font: 400 15px/1.3 var(--sans);
  color: var(--text);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.login-card input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 170, 72, 0.18), inset 3px 0 0 0 rgba(208, 170, 72, 0.85);
}
/* gold pill, navy text (AA: 8.1:1 on #d0aa48, 6.0:1 on #b69030) */
.login-card button {
  width: 100%;
  margin-top: clamp(10px, 2vh, 18px);
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 9999px;
  padding: 16px 44px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  box-shadow: 0 6px 22px rgba(182, 144, 48, 0.3), 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.login-card button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: skewX(-18deg);
  transition: left 0.65s ease;
  pointer-events: none;
}
.login-card button:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(182, 144, 48, 0.45), 0 4px 12px rgba(0, 0, 0, 0.12); }
.login-card button:hover::after { left: 145%; }
.login-card button:active { transform: translateY(0); box-shadow: none; }
.login-card button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.banner {
  margin: 0 0 8px;
  padding: 9px 12px;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy);
  background: #fbf3dc;
  border: 1px solid rgba(182, 144, 48, 0.35);
}
.banner.bad { color: #7a1d14; background: #f8e6e4; border-color: rgba(122, 29, 20, 0.25); }
.login-card .lede {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.login-card .forgot {
  margin: 12px 0 0;
  text-align: center;
}
.login-card .forgot a {
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1px solid rgba(208, 170, 72, 0.9);
  padding-bottom: 1px;
}
.login-card .forgot a:hover { color: var(--gold-dark); }
.login-card .forgot a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }

/* ---- fade-up entrance once the field is coming into focus, 80ms stagger */
@keyframes ada-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.rise { animation: ada-rise 1s var(--ease) both; animation-delay: 360ms; }
.rise-2 { animation-delay: 440ms; }
.rise-3 { animation-delay: 520ms; }
.rise-4 { animation-delay: 600ms; }
.rise-5 { animation-delay: 680ms; }
.rise-6 { animation-delay: 760ms; }

/* ---- reduced motion: static and sharp, nothing turns */
@media (prefers-reduced-motion: reduce) {
  .rise, .field, .lens::before, .lens-ring, .ring-spin { animation: none; }
  .login-card input, .login-card button, .login-card button::after { transition: none; }
  .login-card button:hover { transform: none; }
}

/* ---- short windows (1366x650 and below): tighter card */
@media (max-height: 700px) {
  .login-card h2 { font-size: 21px; }
  .login-card label { margin-top: 3px; }
  .login-card button { padding: 14px 44px; }
}
@media (max-height: 560px) {
  .stage { padding-top: 52px; padding-bottom: 14px; }
  .login-card { padding: 12px 20px 14px; }
  .login-card h2 { font-size: 19px; margin-bottom: 2px; }
  .login-card form { gap: 4px; }
  .login-card label { margin-top: 1px; }
  .login-card input { padding: 7px 14px; }
  .login-card button { margin-top: 8px; padding: 12px 44px; }
  .hairline { margin: 10px 0; }
}

/* ---- stacked: tablets, portrait and phones */
@media (max-width: 980px), (max-aspect-ratio: 1/1) {
  :root { --lens: min(88vw, 58vh, 560px); }
  .brand { position: static; display: flex; justify-content: center; padding-top: 26px; }
  .brand-logo { height: clamp(30px, 9vw, 45px); }
  .stage { flex-direction: column; justify-content: flex-start; padding: 12px 18px 36px; min-height: 0; }
  .side { width: min(420px, 100%); margin: calc(var(--lens) * -0.04) 0 0; align-items: center; text-align: center; }
  .side > .lens-line, .side > .hairline { margin-left: 0; }
  .lens-line { font-size: clamp(30px, 8.4vw, 46px); }
  .hairline { width: 60%; background: linear-gradient(90deg, rgba(208, 170, 72, 0) 0%, rgba(208, 170, 72, 0.7) 50%, rgba(208, 170, 72, 0) 100%); }
  .lens-copy { padding: 0 10%; }
  .wordmark { font-size: calc(var(--lens) * 0.22); }
  .emblem { width: calc(var(--lens) * 0.13); margin-bottom: 2px; }
  .say { margin-top: 4px; font-size: 14px; }
  .welcome-line { margin-top: 6px; font-size: clamp(14px, 3.8vw, 18px); }
  .eyebrow { margin-top: 8px; }
  .eyebrow { font-size: 10px; letter-spacing: 0.2em; gap: 10px; }
  .eyebrow::before, .eyebrow::after { width: 18px; }
}
