/* ManyStreams shared login/reset styles — The Humble Penny */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Geist-Variable.woff2') format('woff2');
}

  /* Layout: full-height split — tall founders' image panel (left) + calm cream form column (right); stacks to one column on mobile, charcoal footer spans full width. */
  :root {
    /* Light side (cream) — the chosen product direction */
    --bg:        #f1ede9;   /* page background (FJA cream) */
    --panel:     #f7f4ef;   /* raised panel */
    --card:      #fbf9f5;   /* form card */
    --input-bg:  #ffffff;   /* text fields */
    --fg:        #1b1e18;   /* primary text / headings */
    --fg-2:      #45473e;   /* secondary text */
    --muted:     #74756a;   /* labels, fine print */
    --bronze:    #8a6410;   /* gold-as-text (deep, reads on cream) */
    --bronze-2:  #a67a11;   /* softer bronze */
    --green:     #2f9e73;   /* eyebrow / small label (mint on cream) */
    --btn-a:     #d9ab34;   /* button gradient start */
    --btn-b:     #b8901f;
    --btn-c:     #8a6410;   /* button gradient end */
    --on-gold:   #1b1e18;   /* text on gold button */
    --hair:      rgba(20,24,15,0.10);
    --field-br:  rgba(20,24,15,0.14);
    --footer-bg: #0E100E;   /* charcoal footer */
    --footer-fg: #ece9df;
    --footer-muted: #8b8c81;
    --footer-hair: rgba(255,255,255,0.10);
    --overlay-ink: #0b0d0b; /* image overlay base */

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --focus: #b8901f;
    color-scheme: light;
  }

  /* Dark side (charcoal) — the brand's real dark mode, not an invert */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg:        #0E100E;
      --panel:     #131512;
      --card:      #181A16;
      --input-bg:  #1E211C;
      --fg:        #ece9df;
      --fg-2:      #c5c2b4;
      --muted:     #8b8c81;
      --bronze:    #eccb4a;   /* gold reads as itself on charcoal */
      --bronze-2:  #d8bf6a;
      --green:     #77eab8;   /* mint returns on dark */
      --btn-a:     #f4da72;
      --btn-b:     #eccb4a;
      --btn-c:     #c69a2f;
      --on-gold:   #171912;
      --hair:      rgba(255,255,255,0.08);
      --field-br:  rgba(255,255,255,0.14);
      --footer-bg: #090a08;
      --footer-fg: #ece9df;
      --footer-muted: #8b8c81;
      --footer-hair: rgba(255,255,255,0.08);
      --overlay-ink: #000000;
      --focus:     #eccb4a;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg:        #0E100E;
    --panel:     #131512;
    --card:      #181A16;
    --input-bg:  #1E211C;
    --fg:        #ece9df;
    --fg-2:      #c5c2b4;
    --muted:     #8b8c81;
    --bronze:    #eccb4a;
    --bronze-2:  #d8bf6a;
    --green:     #77eab8;
    --btn-a:     #f4da72;
    --btn-b:     #eccb4a;
    --btn-c:     #c69a2f;
    --on-gold:   #171912;
    --hair:      rgba(255,255,255,0.08);
    --field-br:  rgba(255,255,255,0.14);
    --footer-bg: #090a08;
    --footer-fg: #ece9df;
    --footer-muted: #8b8c81;
    --footer-hair: rgba(255,255,255,0.08);
    --overlay-ink: #000000;
    --focus:     #eccb4a;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  a { color: inherit; }
  img { max-width: 100%; }

  /* ---------- Page frame ---------- */
  .page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .split {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 0;
    max-width: 1340px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 3.2vw, 44px);
    padding-left: max(clamp(20px, 3.2vw, 44px), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(20px, 3.2vw, 44px), env(safe-area-inset-right, 0px));
    gap: clamp(24px, 3vw, 56px);
    align-items: stretch;
  }

  /* ---------- Left: brand / founders panel ---------- */
  .brand-panel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--panel);
    box-shadow:
      0 1px 0 var(--hair),
      0 30px 60px -40px rgba(11,13,11,0.55);
    isolation: isolate;
  }
  .brand-panel__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 24%;
    z-index: -2;
  }
  /* soft, tasteful darkening only where text sits (top + bottom), image clear in the middle */
  .brand-panel__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(to bottom,
        color-mix(in srgb, var(--overlay-ink) 50%, transparent) 0%,
        color-mix(in srgb, var(--overlay-ink) 15%, transparent) 20%,
        transparent 40%,
        transparent 54%,
        color-mix(in srgb, var(--overlay-ink) 22%, transparent) 76%,
        color-mix(in srgb, var(--overlay-ink) 48%, transparent) 100%);
  }

  .brand-panel__top {
    padding: clamp(22px, 2.4vw, 34px);
    display: flex;
    align-items: center;
    gap: 13px;
    color: #fff;
  }
  .brand-panel__bottom {
    padding: clamp(40px, 4vw, 64px) clamp(24px, 2.6vw, 40px) clamp(24px, 2.6vw, 40px);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Soft caption vignette: hugs the text, feathers to nothing upward, so white type
       stays legible even over the white clothing without a visible box or border. */
    background: linear-gradient(to top,
      color-mix(in srgb, var(--overlay-ink) 80%, transparent) 0%,
      color-mix(in srgb, var(--overlay-ink) 72%, transparent) 42%,
      color-mix(in srgb, var(--overlay-ink) 54%, transparent) 72%,
      color-mix(in srgb, var(--overlay-ink) 28%, transparent) 90%,
      transparent 100%);
  }

  /* Wordmark */
  .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
  }
  .wordmark__text {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0.1px;
    line-height: 1;
    white-space: nowrap;
  }
  .wordmark__text sup {
    font-size: 0.5em;
    font-family: var(--sans);
    vertical-align: super;
    margin-left: 1px;
  }
  .brand-panel__top .wordmark__text { color: #fff; }

  .brand-panel__eyebrow {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.92;
    display: inline-flex;
    align-items: center;
    gap: 9px;
  }
  .brand-panel__eyebrow::before {
    content: "";
    width: 22px;
    height: 1.5px;
    background: var(--btn-a);
    display: inline-block;
  }
  .brand-panel__headline {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(23px, 2.2vw, 31px);
    line-height: 1.18;
    margin: 0;
    text-wrap: balance;
    max-width: 19ch;
    text-shadow: 0 1px 30px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.28);
  }
  .brand-panel__headline em {
    font-style: italic;
    color: var(--btn-a);
  }
  .brand-panel__note {
    font-size: 14.5px;
    line-height: 1.6;
    max-width: 42ch;
    color: rgba(255,255,255,0.86);
    margin: 0;
  }
  .brand-panel__cta {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    padding: 11px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
  }
  .brand-panel__cta:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.7);
  }
  .brand-panel__cta svg { transition: transform .18s ease; }
  .brand-panel__cta:hover svg { transform: translateX(3px); }

  /* ---------- Right: form column ---------- */
  .form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(8px, 2vw, 40px) clamp(4px, 2.2vw, 48px);
  }
  .form-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .form-eyebrow {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 14px;
  }
  .form-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 3.4vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    color: var(--fg);
    text-wrap: balance;
  }
  .form-sub {
    font-size: 15px;
    color: var(--fg-2);
    margin: 0 0 30px;
    max-width: 38ch;
  }

  /* Inline messages (semantic colours, kept separate from the brand accent) */
  .form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: color-mix(in srgb, #c0392b 12%, var(--card));
    border: 1px solid color-mix(in srgb, #c0392b 38%, transparent);
    color: var(--fg);
    font-size: 14px;
    line-height: 1.45;
    padding: 12px 14px;
    border-radius: 11px;
    margin: 0 0 22px;
  }
  .form-alert svg { flex: 0 0 auto; margin-top: 1px; color: #c0392b; }
  .form-alert.is-success {
    background: color-mix(in srgb, var(--green) 14%, var(--card));
    border-color: color-mix(in srgb, var(--green) 42%, transparent);
  }
  .form-alert.is-success svg { color: var(--green); }

  /* Success panel (check your email / password changed) */
  .state-panel {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .state-panel__badge {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--green) 16%, var(--card));
    color: var(--green);
    margin-bottom: 2px;
  }
  .state-panel__note { font-size: 15px; color: var(--fg-2); margin: 0; max-width: 42ch; }
  .state-panel__note strong { color: var(--fg); font-weight: 600; }

  /* Password requirements / match hint */
  .pw-hint {
    font-size: 12.5px;
    color: var(--muted);
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .pw-hint.is-bad { color: #c0392b; }
  .pw-hint.is-good { color: var(--green); }

  form { display: flex; flex-direction: column; gap: 18px; }

  .field { display: flex; flex-direction: column; gap: 7px; }
  .field > label {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--fg-2);
  }
  .field__wrap { position: relative; display: flex; align-items: center; }
  .field__icon {
    position: absolute;
    left: 15px;
    display: grid;
    place-items: center;
    color: var(--muted);
    pointer-events: none;
  }
  input[type="text"],
  input[type="email"],
  input[type="password"] {
    width: 100%;
    font-family: var(--sans);
    font-size: 15.5px;
    color: var(--fg);
    background: var(--input-bg);
    border: 1px solid var(--field-br);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    transition: border-color .16s ease, box-shadow .16s ease;
    appearance: none;
  }
  input::placeholder { color: var(--muted); opacity: 0.8; }
  input:hover { border-color: var(--bronze-2); }
  input:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
  }

  .pw-toggle {
    position: absolute;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    line-height: 0;
  }
  .pw-toggle:hover { color: var(--fg-2); }
  .pw-toggle:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
  }

  .form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -2px;
    flex-wrap: wrap;
  }
  .remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--fg-2);
    cursor: pointer;
    user-select: none;
  }
  .remember input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--field-br);
    border-radius: 5px;
    background: var(--input-bg);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
    flex: 0 0 auto;
  }
  .remember input:checked {
    background: linear-gradient(145deg, var(--btn-a), var(--btn-c));
    border-color: var(--btn-c);
  }
  .remember input:checked::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--on-gold);
    clip-path: polygon(14% 52%, 40% 78%, 88% 20%, 78% 10%, 39% 58%, 24% 42%);
  }
  .remember input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
  }
  .link-bronze {
    font-size: 14px;
    font-weight: 600;
    color: var(--bronze);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
  }
  .link-bronze:hover { border-bottom-color: currentColor; }

  .btn-login {
    margin-top: 8px;
    width: 100%;
    border: 0;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--on-gold);
    background: linear-gradient(135deg, var(--btn-a) 0%, var(--btn-b) 52%, var(--btn-c) 100%);
    padding: 15px 22px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--btn-c) 70%, transparent);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  }
  .btn-login:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--btn-c) 75%, transparent); }
  .btn-login:active { transform: translateY(0); }
  .btn-login:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
  .btn-login svg { transition: transform .16s ease; }
  .btn-login:hover svg { transform: translateX(3px); }

  /* Secondary, tasteful non-member line inside the form column (shows on narrow too) */
  .joinline {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--hair);
    font-size: 14.5px;
    color: var(--fg-2);
    text-align: center;
  }
  .joinline a {
    color: var(--bronze);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s ease;
  }
  .joinline a:hover { border-bottom-color: currentColor; }

  .reassure {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
  }
  .reassure svg { flex: 0 0 auto; }

  /* ---------- Footer ---------- */
  footer {
    background: var(--footer-bg);
    color: var(--footer-fg);
    margin-top: clamp(20px, 3vw, 40px);
  }
  .footer-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: clamp(34px, 4vw, 52px) clamp(20px, 3.2vw, 44px);
    padding-left: max(clamp(20px, 3.2vw, 44px), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(20px, 3.2vw, 44px), env(safe-area-inset-right, 0px));
    padding-bottom: max(clamp(34px, 4vw, 52px), env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 26px;
  }
  .footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  .footer-inner .wordmark__text { color: var(--footer-fg); }
  .footer-tag {
    font-size: 13.5px;
    color: var(--footer-muted);
    max-width: 34ch;
  }
  .socials { display: inline-flex; gap: 10px; }
  .socials a {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--footer-hair);
    color: var(--footer-fg);
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
  }
  .socials a:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); transform: translateY(-1px); }
  .footer-divider { height: 1px; background: var(--footer-hair); }
  .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    flex-wrap: wrap;
  }
  .footer-nav {
    display: flex;
    gap: 8px 26px;
    flex-wrap: wrap;
    font-size: 13.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .footer-nav a {
    color: var(--footer-muted);
    text-decoration: none;
    transition: color .15s ease;
  }
  .footer-nav a:hover { color: var(--footer-fg); }
  .footer-legal { font-size: 12.5px; color: var(--footer-muted); }
  .footer-legal span { color: var(--bronze-2); }

  /* Theme toggle (small, top-right of form column) */
  .theme-toggle {
    position: absolute;
    top: max(16px, env(safe-area-inset-top, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    z-index: 20;
    border: 1px solid var(--hair);
    background: color-mix(in srgb, var(--card) 80%, transparent);
    color: var(--fg-2);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid; place-items: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color .15s ease, border-color .15s ease;
  }
  .theme-toggle:hover { color: var(--fg); border-color: var(--bronze-2); }
  .theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .theme-toggle .moon { display: none; }
  :root[data-theme="dark"] .theme-toggle .sun,
  :root:not([data-theme="light"]) .theme-toggle .sun { }

  /* ---------- Responsive: stack ---------- */
  @media (max-width: 860px) {
    .split {
      grid-template-columns: 1fr;
      padding: clamp(14px, 4vw, 22px);
      padding-left: max(clamp(14px, 4vw, 22px), env(safe-area-inset-left, 0px));
      padding-right: max(clamp(14px, 4vw, 22px), env(safe-area-inset-right, 0px));
      gap: 20px;
    }
    .brand-panel {
      min-height: 0;
      aspect-ratio: 16 / 11;
      max-height: 44vh;
    }
    .brand-panel__img { object-position: 50% 28%; }
    .brand-panel__headline { font-size: clamp(22px, 6vw, 28px); }
    .brand-panel__note { display: none; } /* keep the image band calm on small screens */
    .form-col { padding: 8px 2px 4px; }
    .form-inner { max-width: 460px; }
  }

  @media (max-width: 560px) {
    .brand-panel { aspect-ratio: 4 / 3; max-height: 40vh; }
    .brand-panel__cta { font-size: 13px; padding: 10px 16px; }
    .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }