/* signin.css — the sign-in page in the native iPad look (canon delta 16).

   Purpose: /login only. The owner ruled on 2026-09-23 that the sign-in page
   matches the iPad app's glass card — the accepted mock is
   docs/design/ipad-2026-08-11/mockups/ipad-m2-signin.png — while every other
   web page keeps delta 11.4's flat, no-glass system. So this file is the one
   place outside app.css where glass, the iOS shadows and the 32px sheet
   radius may live, and tests/test_web_v2_contract.py pins it to login.html.
   Values are lifted from ios/CaseRoom/DesignSystem (Glass.swift, Tokens.swift,
   Measure.swift: 440pt auth card, 18pt fields).
   Inputs: linked from webapp/templates/login.html's head_extra block. It never
   shares a document with app.css (login.html extends base.html), so there is
   no cascade order to reason about.
   Run: open /login; tests: .venv/bin/python -m pytest tests/test_login_page_delta.py -q */

/* The backdrop is the glass's reason to exist: two faint tint blobs and one
   giant hairline staircase (canon §1 "glass needs something behind it"). It is
   painted as background layers so the template carries no decorative <svg>. */
.si-stage {
  position: relative;
  flex: 1;
  min-height: 100vh;
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40' fill='none'%3E%3Cpath d='M4 35 H15 V25 H26 V15 H37 V4 H45' stroke='%23C9D2DF' stroke-width='0.6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat right -40px top 150px / 720px 600px,
    radial-gradient(circle 310px at 190px 430px, rgba(27,154,95,.12), transparent),
    radial-gradient(circle 350px at calc(100% - 170px) calc(100% - 390px), rgba(46,86,192,.10), transparent),
    #F3F5F8;
  color: #0D1C31;
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Glass recipes, verbatim from Glass.swift ─────────────────────────────── */
.si-sheet {
  background: linear-gradient(135deg, rgba(255,255,255,.66), rgba(255,255,255,.4));
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(13,28,49,.16),
              inset 0 1.5px 0 rgba(255,255,255,.85),
              inset 0 -1px 0 rgba(255,255,255,.3);
}
.si-chip {
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  backdrop-filter: blur(12px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(13,28,49,.07), inset 0 1px 0 rgba(255,255,255,.9);
}
/* Reduce Transparency: the same fallback the app takes — solid surface. */
@media (prefers-reduced-transparency: reduce) {
  .si-sheet, .si-chip { background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ── Public chrome: wordmark chip left, Library + Sign up right ───────────── */
.si-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 56px 0;
}
.si-wordmark {
  display: flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 20px 0 18px; box-sizing: border-box;
  color: #0D1C31; font-size: 18px; text-decoration: none;
}
.si-links { display: flex; align-items: center; gap: 18px; height: 48px; padding: 0 6px 0 22px; box-sizing: border-box; }
.si-links a { font-size: 13.5px; font-weight: 600; color: #0D1C31; text-decoration: none; }
.si-links .si-signup {
  display: inline-flex; align-items: center; height: 36px; padding: 0 18px;
  border-radius: 999px; background: #0D1C31; color: #F3F5F8; font-weight: 700;
}
.si-my { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-weight: 400; }
.si-case { font-weight: 800; letter-spacing: -.02em; }

/* ── The card ─────────────────────────────────────────────────────────────── */
.si-main { position: relative; z-index: 1; display: flex; justify-content: center; padding: 70px 16px 64px; }
.si-card {
  width: 440px; max-width: 100%; box-sizing: border-box; padding: 40px 40px 32px;
  animation: si-rise .42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes si-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .si-card { animation: none; } }

.si-brand { display: flex; align-items: center; gap: 9px; font-size: 22px; }
.si-brand h1 { margin: 0; font-size: inherit; font-weight: 400; line-height: 1.2; }
.si-lede {
  font-family: 'Source Serif 4', Georgia, serif; font-style: italic;
  font-size: 16px; line-height: 1.55; color: #515A66; margin: 14px 0 24px;
}
.si-kicker { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #515A66; }

.si-note { border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; font-size: 13px; line-height: 1.5; }
.si-note-error   { background: #FFF1F2; border: 1px solid #FECDD3; color: #9F1239; }
.si-note-success { background: #E8F4EE; border: 1px solid #A8D8C0; color: #116340; }
.si-note-info    { background: #FFFFFF; border: 1px solid #C9D2DF; color: #515A66; }

/* Buttons: primary = ink capsule, secondary = glass capsule (canon §1). */
.si-btn {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 50px; width: 100%; padding: 0 28px; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 600; color: #0D1C31;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.si-btn:hover { transform: translateY(-1px); }
.si-btn:active { transform: scale(.96); }
.si-btn-ink { background: #0D1C31; color: #F3F5F8; border: 0; font-weight: 700; }
.si-btn + .si-btn { margin-top: 12px; }
.si-btn-submit { width: auto; height: 44px; padding: 0 30px; font-size: 13.5px; font-weight: 700; }
.si-badge {
  width: 20px; height: 20px; border-radius: 5px; margin-right: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFFFFF; font-size: 11px; font-weight: 800;
}
.si-badge-li { color: #0A66C2; }
.si-badge-g  { color: #4285F4; border: 1px solid #DDE3EB; }

.si-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 4px; }
.si-or::before, .si-or::after { content: ""; flex: 1; border-top: 1px solid #C9D2DF; }

/* Fields: the kicker label sits inside the 18pt field, as on iOS. */
.si-field {
  display: block; margin-top: 12px; padding: 12px 18px;
  background: #FFFFFF; border: 1px solid #C9D2DF; border-radius: 18px;
  transition: border-color 160ms;
}
.si-field:focus-within { border-color: #0D1C31; }
.si-field .si-kicker { letter-spacing: .14em; display: block; }
.si-field input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 0;
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 15px; color: #0D1C31;
}
.si-field input::placeholder { color: #A9B4C4; }

.si-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.si-underlink { font-size: 13.5px; font-weight: 600; color: #0D1C31; text-decoration: underline; text-underline-offset: 3px; }
.si-underlink-quiet { font-size: 12.5px; color: #515A66; }
.si-underlink:hover { color: #2E56C0; }

.si-foot { border-top: 1px solid #DDE3EB; margin-top: 22px; padding-top: 16px; text-align: center; }
.si-meta { font-size: 12px; color: #515A66; }
.si-foot .si-underlink { display: inline-block; margin-top: 8px; }
/* Drawn in faint (#A9B4C4) on the board; muted here because this is the
   Guideline 1.2 consent line and faint fails contrast on the glass. */
.si-legal { font-size: 11px; line-height: 1.5; color: #515A66; margin: 16px 0 0; }
.si-legal a { color: #515A66; text-decoration: underline; text-underline-offset: 2px; }

a:focus-visible, button:focus-visible { outline: 2px solid #0D1C31; outline-offset: 3px; }

/* Narrow screens: the card keeps its drawing and just loses the side gutter. */
@media (max-width: 560px) {
  .si-header { padding: 16px 16px 0; }
  .si-links { gap: 12px; padding-left: 16px; }
  .si-main { padding-top: 32px; }
  .si-card { padding: 32px 24px 26px; }
}
