/* Secure card page. Mobile first, clean white, Oxwell brand.
   The one bold element is the navy masthead with the real lockup (copper OX, white WELL),
   the way the logo is shown on navy in Oxwell's own branding. Everything else stays quiet.
   No external fonts: system stacks only (CSP font-src 'self', nothing to load).
   Type scale (classic): 12 / 14 / 16 / 18 / 24 / 30. */

:root {
  --navy: #0b1828;    /* brand ink and masthead */
  --copper: #b77134;  /* brand accent: OX, tick, focus. Never body text (3.9:1 on white) */
  --slate: #475569;   /* secondary text (7.6:1 on white) */
  --mist: #e2e8f0;    /* hairlines */
  --ice: #f5f7fa;     /* quiet surface */
  --white: #ffffff;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --gutter: 16px;
  --column: 600px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* The hidden attribute must always win over component display rules (e.g. the iframe's display:block). */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

/* Frame guard (backup for frame-ancestors / X-Frame-Options): app.js adds this class when framed. */
html.is-framed body { display: none !important; }

/* ---- Masthead ---- */

.masthead {
  flex-shrink: 0;
  background: var(--navy);
}

.masthead-inner {
  max-width: var(--column);
  margin: 0 auto;
  padding: 16px var(--gutter);
}

.wordmark {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--white);
}

.wordmark-ox { color: var(--copper); }

/* ---- Page column ---- */

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: 28px var(--gutter) 32px;
}

.page-center { text-align: center; }

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 24px;
  color: var(--slate);
}

/* ---- Embedded form ---- */

/* Without JavaScript the frame can't be set up, so it stays hidden and the fallback link is used. */
.form-wrap { display: none; }

html.js .form-wrap {
  display: block;
  position: relative;
  margin: 0 0 24px;
}

.form-loading {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 0;
  margin: 0;
  text-align: center;
  color: var(--slate);
}

.form-wrap.is-loaded .form-loading { display: none; }

.form-slow {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--copper);
  background: var(--ice);
  font-size: 14px;
}

.form-unavailable {
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--mist);
  border-radius: 8px;
  background: var(--ice);
  text-align: center;
}

.form-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 1000px;
  border: 0;
  background: transparent;
}

/* ---- Notes and links ---- */

.note {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--slate);
}

.note-strong {
  color: var(--navy);
  font-weight: 600;
}

.fallback {
  margin: 0;
  font-size: 14px;
  color: var(--slate);
}

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: var(--copper); }

a:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Submitted: one confirming moment (the tick draws itself once) ---- */

.tick {
  display: block;
  width: 56px;
  height: 56px;
  margin: 8px auto 20px;
}

.tick circle,
.tick path {
  fill: none;
  stroke: var(--copper);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tick circle { stroke-width: 2.5; }

/* Visible by default; the draw animation only layers on top ("backwards" applies the hidden
   start state during the delay), so the tick still shows if animations never run. */
.tick path {
  stroke-width: 3.5;
  stroke-dasharray: 32;
  stroke-dashoffset: 0;
  animation: tick-draw 420ms ease-out 150ms backwards;
}

@keyframes tick-draw {
  from { stroke-dashoffset: 32; }
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tick path { animation: none; }
}

/* ---- Footer ---- */

.footer {
  flex-shrink: 0;
  border-top: 1px solid var(--mist);
  padding: 16px var(--gutter) 20px;
  text-align: center;
  font-size: 12px;
  color: var(--slate);
}

.footer p { margin: 0 0 4px; }
.footer a { color: var(--slate); }

/* ---- Larger screens ---- */

@media (min-width: 480px) {
  .form-frame { height: 940px; }
}

@media (min-width: 768px) {
  .masthead-inner { padding-top: 20px; padding-bottom: 20px; }
  .wordmark { font-size: 24px; }
  .page { padding-top: 48px; }
  h1 { font-size: 30px; }
  .lede { font-size: 18px; }
}
