/* ============================================================
   Von Newman Learning — design tokens
   Palette pulled from brand mark: warm cream ground, ink mark,
   single terracotta accent square.
   ============================================================ */

:root {
  /* color */
  --cream:        #F3EEE3;
  --cream-deep:   #E9E1D0;
  --ink:          #211D18;
  --ink-soft:     #4B453B;
  --ink-faint:    #8A8275;
  --terracotta:   #B15E34;
  --terracotta-deep: #8A4526;
  --terracotta-bright: #CB7C45;
  --line:         rgba(33, 29, 24, 0.12);
  --line-on-ink:  rgba(243, 238, 227, 0.16);

  /* type */
  --display: 'Fraunces', 'Iowan Old Style', ui-serif, Georgia, serif;
  --body: 'IBM Plex Sans', 'Inter Tight', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --step-caption: 0.8rem;
  --step-body: 1.0625rem;
  --step-lead: 1.375rem;
  --step-h3: 1.75rem;
  --step-h2: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);
  --step-h1: clamp(2.75rem, 2rem + 4vw, 5.5rem);

  --container: 1240px;
  --gutter: clamp(1.5rem, 4vw, 4rem);

  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  transition: background-color 0.6s ease, color 0.6s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 1.4em;
  height: 2px;
  background: currentColor;
  display: inline-block;
}

/* focus states */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--terracotta); color: var(--cream); }

/* ============================================================
   Scroll-linked background layer
   The whole page sits on a fixed color layer whose hue drifts
   between cream / cream-deep / ink as the reader moves through
   sections — the "dynamic on scroll" signature move.
   ============================================================ */
#bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--cream);
  transition: background-color 0.5s linear;
}
body.on-ink { color: var(--cream); }
body.on-ink .eyebrow { color: var(--terracotta-bright); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding-block: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(243, 238, 227, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.5s ease, border-color 0.5s ease;
}
body.on-ink .site-header {
  background: rgba(33, 29, 24, 0.86);
  border-bottom-color: var(--line-on-ink);
}
section[id] { scroll-margin-top: 84px; }
.site-header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
.main-nav { justify-self: center; }
.main-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.brand-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-word span {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--terracotta);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 3px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.25s ease;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after { right: 0; }

.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.3rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-login {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-login:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-signup {
  background: var(--ink);
  color: var(--cream);
}
body.on-ink .btn-signup { background: var(--terracotta-deep); color: var(--cream); }
.btn-signup:hover { background: var(--terracotta-deep); transform: translateY(-1px); }
body.on-ink .btn-signup:hover { background: #6E3620; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 6rem;
  position: relative;
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.hero h1 {
  font-size: var(--step-h1);
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}
.hero-side {
  padding-bottom: 0.5rem;
}
.hero-side p {
  font-size: var(--step-lead);
  color: var(--ink-soft);
  max-width: 32ch;
  line-height: 1.5;
}
body.on-ink .hero-side p { color: rgba(243,238,227,0.75); }

.hero-tiles {
  width: min(30vw, 168px);
  margin-bottom: 1.75rem;
}

.hero-meta {
  margin-top: clamp(3rem, 6vw, 5.5rem);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
body.on-ink .hero-meta { border-color: var(--line-on-ink); }
.hero-meta .scroll-cue {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-faint);
}
.scroll-cue-line {
  width: 46px;
  height: 1px;
  background: currentColor;
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  transform: translateX(-100%);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue { 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }

.hero-locations {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-wrap: wrap;
}

/* ============================================================
   Section rhythm
   ============================================================ */
.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  align-items: end;
}
.section-head h2 { font-size: var(--step-h2); }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-head .lede {
  font-size: var(--step-lead);
  color: var(--ink-soft);
  line-height: 1.5;
}
body.on-ink .section-head .lede { color: rgba(243,238,227,0.75); }

/* ---- sectors (public / private) ---- */
.sectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.sector-card {
  background: var(--cream);
  padding: clamp(2rem, 4vw, 3.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sector-card h3 { font-size: var(--step-h3); }
.sector-card p { color: var(--ink-soft); max-width: 42ch; }
.sector-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}
.sector-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.sector-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.sector-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--terracotta);
}

/* ---- company ---- */
.company {
  background: var(--cream-deep);
}
.company-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.company-figure {
  position: sticky;
  top: 7rem;
  align-self: start;
}
.pull-quote {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
  border-left: 2px solid var(--terracotta);
  padding-left: 1.5rem;
  margin: 0;
}
.pull-quote cite {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1rem;
}
.company-copy {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.company-copy p { color: var(--ink-soft); max-width: 60ch; }
.timeline {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}
.timeline-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.5rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.timeline-row .year {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--terracotta);
}
.timeline-row h4 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.timeline-row p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---- global / dark section ---- */
.global {
  background: var(--ink);
  color: var(--cream);
}
.global .eyebrow { color: var(--terracotta-bright); }
.global .section-head .lede { color: rgba(243,238,227,0.75); }
.global-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-on-ink);
  border: 1px solid var(--line-on-ink);
  margin-top: 2rem;
}
.global-card {
  background: var(--ink);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.global-card .region {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-bright);
  display: block;
  margin-bottom: 0.75rem;
}
.global-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.global-card p {
  color: rgba(243,238,227,0.7);
  font-size: 0.95rem;
}

/* ---- people ---- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.person {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.person-avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
  /* fallback glyph styling if an image fails to load */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--terracotta);
}
.person-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* warm monochrome so three different photos share one palette */
  filter: grayscale(1) sepia(0.4) saturate(1.2) contrast(1.03) brightness(1.02);
  transition: filter 0.55s ease, transform 0.6s ease;
}
.person-avatar::after {
  /* terracotta-to-ink duotone wash — ties the images to the brand */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, rgba(177, 94, 52, 0.22), rgba(33, 29, 24, 0.34));
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.person:hover .person-avatar img,
.person:focus-within .person-avatar img {
  filter: grayscale(0) saturate(1.05) contrast(1);
  transform: scale(1.035);
}
.person:hover .person-avatar::after,
.person:focus-within .person-avatar::after {
  opacity: 0;
}
.person h4 { font-size: 1.1rem; margin-bottom: 0.15rem; }
.person .role {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.person p.bio {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.people-note {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---- contact ---- */
.contact {
  background: var(--ink);
  color: var(--cream);
}
.contact .eyebrow { color: var(--terracotta-bright); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.contact h2 { font-size: var(--step-h2); max-width: 12ch; }
.contact-lede {
  font-size: var(--step-lead);
  color: rgba(243,238,227,0.75);
  max-width: 34ch;
  margin-top: 1.25rem;
}
.contact-channels {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-channel {
  border-top: 1px solid var(--line-on-ink);
  padding-top: 1.25rem;
}
.contact-channel .label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-bright);
  display: block;
  margin-bottom: 0.4rem;
}
.contact-channel a, .contact-channel span {
  font-family: var(--display);
  font-size: 1.3rem;
  text-decoration: none;
}
.contact-channel a:hover { color: var(--terracotta); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243,238,227,0.6);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-on-ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.6rem 0.1rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--terracotta);
}
.field select option { color: var(--ink); }
.contact-form .btn-signup {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--terracotta-deep);
}
.contact-form .btn-signup:hover { background: var(--cream); color: var(--ink); }

/* ---- footer ---- */
.site-footer {
  background: var(--ink);
  color: rgba(243,238,227,0.6);
  padding-block: 2.5rem;
  border-top: 1px solid var(--line-on-ink);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--cream); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-tiles { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .company-grid { grid-template-columns: 1fr; }
  .company-figure { position: static; margin-bottom: 1.5rem; }
  .global-grid { grid-template-columns: 1fr 1fr; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav { gap: 1.25rem; }
  .sectors { grid-template-columns: 1fr; }
  .global-grid { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .hero-locations { display: none; }
}

@media (max-width: 640px) {
  .main-nav-links {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--cream);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--gutter);
    gap: 1.25rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle { display: flex; width: 32px; height: 32px; }
  .brand-word { font-size: 0.85rem; }
  .auth-actions { gap: 0.35rem; }
  .auth-actions .btn { padding: 0.55rem 0.7rem; font-size: 0.78rem; white-space: nowrap; }
  .people-grid { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ============================================================
   Auth pages (login / signup) — split rail + form panel
   ============================================================ */
.auth-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.auth-body .site-header {
  position: sticky;
  top: 0;
  background: var(--cream);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}

.auth-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* --- left brand rail --- */
.auth-rail {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: clip;
}
.auth-rail .eyebrow { color: var(--terracotta-bright); }
.auth-rail-mark {
  width: 46px;
  height: 46px;
}
.auth-rail-body { max-width: 26ch; }
.auth-rail-body h1 {
  font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem);
  margin-top: 1.25rem;
  line-height: 1.05;
}
.auth-rail-body h1 em { font-style: italic; color: var(--terracotta-bright); }
.auth-rail-body p {
  color: rgba(243, 238, 227, 0.72);
  margin-top: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
}
.auth-rail-foot {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 238, 227, 0.55);
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.auth-rail-tiles {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 300px;
  opacity: 0.5;
  pointer-events: none;
}

/* --- right form panel --- */
.auth-panel {
  background: var(--cream);
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding-block: 2.5rem;
}
.auth-card h2 {
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem);
}
.auth-card .auth-sub {
  color: var(--ink-soft);
  margin-top: 0.6rem;
  margin-bottom: 2rem;
}
.auth-card .auth-sub a {
  color: var(--terracotta-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* federated buttons */
.federated {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fed-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}
.fed-btn:hover {
  border-color: var(--terracotta);
  background: rgba(177, 94, 52, 0.05);
  transform: translateY(-1px);
}
.fed-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* sign-in method tabs */
.auth-tabs {
  display: flex;
  gap: 1.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.6rem;
}
.auth-tab {
  background: none;
  border: none;
  padding: 0 0 0.8rem;
  margin-bottom: -1px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--terracotta);
}
.auth-tabpanel[hidden] { display: none; }

/* form fields (light background variant) */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.auth-field label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.auth-field input,
.auth-field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.6rem 0.1rem;
  border-radius: 0;
}
.auth-field input::placeholder { color: var(--ink-faint); }
.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--terracotta);
}
.auth-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  transition: background-color 9999s;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

/* sector segmented choice */
.sector-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.sector-choice label {
  position: relative;
  text-align: center;
  padding: 0.8rem 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background-color 0.18s ease, color 0.18s ease;
}
.sector-choice label + label { border-left: 1px solid var(--line); }
.sector-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
}
.sector-choice input:checked + span {
  color: var(--cream);
}
.sector-choice label:has(input:checked) {
  background: var(--ink);
  color: var(--cream);
}
.sector-choice label:has(input:focus-visible) {
  outline: 2px solid var(--terracotta);
  outline-offset: -2px;
}

/* remember / forgot row */
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--terracotta-deep);
}
.auth-meta a {
  color: var(--terracotta-deep);
  text-decoration: none;
  font-weight: 500;
}
.auth-meta a:hover { text-decoration: underline; }

.auth-submit {
  width: 100%;
  padding: 0.9rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.auth-foot {
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}
.auth-foot a {
  color: var(--terracotta-deep);
  font-weight: 600;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-consent {
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.5;
  margin-top: 0.25rem;
}
.auth-consent a { color: var(--ink-soft); }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-rail {
    min-height: auto;
    padding: 2.5rem var(--gutter);
  }
  .auth-rail-body { max-width: none; }
  .auth-rail-body h1 { font-size: 1.9rem; }
  .auth-rail-tiles { display: none; }
  .auth-rail-foot { display: none; }
  .auth-card { max-width: 460px; }
}

@media (max-width: 480px) {
  .auth-row { grid-template-columns: 1fr; }
}
