/* IOPTN — Stage 1 landing page styles
   Brand colors sampled from landing/assets/logo.png:
     primary green: #51B948
     accent blue:   #5161AC
*/

:root {
  --green-500: #51B948;
  --green-600: #45A03A;
  --green-700: #38872E;
  --blue-500:  #5161AC;
  --blue-600:  #455295;
  --blue-700:  #38427B;
  --ink-900:   #0F1525;
  --ink-700:   #2A3349;
  --ink-500:   #5A6379;
  --ink-300:   #9AA1B4;
  --ink-100:   #DEE3EE;
  --bg:        #FFFFFF;
  --bg-soft:   #F6F8FB;
  --bg-tint:   #EEF6EC;
  --shadow-md: 0 6px 24px rgba(15, 21, 37, 0.10);
  --shadow-lg: 0 18px 48px rgba(15, 21, 37, 0.18);
  --radius-md: 12px;
  --radius-lg: 18px;
  --max-w:     1120px;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* ------------------------------------------------------------ Header */
.site-header {
  padding: 22px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand { display: inline-block; }
.brand img { width: 160px; height: auto; }

/* ------------------------------------------------------------ Hero */
.hero {
  padding: 28px 24px 96px;
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(81, 97, 172, 0.08) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(60% 80% at 0% 80%, rgba(81, 185, 72, 0.10) 0%, rgba(255,255,255,0) 60%),
    var(--bg);
}

.hero-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--ink-900);
}
.hero-mark {
  display: inline-block;
  white-space: nowrap;
  word-spacing: 0.45em;
  margin-right: 0.35em;
}
.hero-i, .hero-n { color: var(--green-500); }
.hero-opt       { color: var(--blue-500); font-weight: 800; letter-spacing: 0.05em; }
.hero-rest      { color: var(--ink-900); font-weight: 700; }

.hero-subhead {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--ink-700);
  margin: 0 0 8px;
  max-width: 780px;
}
.hero-supporting {
  font-size: 1.05rem;
  color: var(--ink-500);
  margin: 0 0 36px;
  max-width: 720px;
}

/* ------------------------------------------------------------ CTAs */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--ink-700);
  transition: transform 60ms ease, background-color 120ms ease, box-shadow 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  min-width: 220px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid rgba(81, 97, 172, 0.4);
  outline-offset: 2px;
}
.btn-primary    { background: var(--green-500); }
.btn-primary:hover  { background: var(--green-600); }
.btn-secondary  { background: var(--blue-500); }
.btn-secondary:hover { background: var(--blue-600); }

.cta-note {
  color: var(--ink-500);
  font-size: 0.95rem;
  margin: 6px 0 0;
}

/* ------------------------------------------------------------ How it works */
.how-it-works {
  background: var(--bg-soft);
  padding: 80px 24px 96px;
}
.how-it-works h2 {
  margin: 0 auto 48px;
  max-width: var(--max-w);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max-w);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  counter-reset: step;
}
.steps li {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-md);
}
.steps h3 {
  font-size: 1.15rem;
  margin: 14px 0 8px;
  color: var(--ink-900);
}
.steps p {
  margin: 0;
  color: var(--ink-500);
  font-size: 1rem;
  line-height: 1.55;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--green-700);
  font-weight: 800;
  font-size: 1.05rem;
}

/* ------------------------------------------------------------ Content page (privacy / terms / about) */
.content-page {
  max-width: 760px;
  margin: 0 auto;
  /* +25px of clear space on the left vs. the original 24px floor.
     Right padding mirrors so the centered box stays balanced. */
  padding: 32px clamp(49px, 6vw, 64px) 80px;
  color: var(--ink-700);
  font-size: 1.02rem;
  line-height: 1.65;
}
.content-page h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0 0 8px;
}
.content-page h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 32px 0 8px;
  letter-spacing: -0.005em;
}
.content-page p,
.content-page ul { margin: 0 0 14px; }
.content-page ul { padding-left: 1.25em; }
.content-page li { margin-bottom: 6px; }
.content-page .last-updated {
  color: var(--ink-500);
  font-size: 0.92rem;
  margin-bottom: 28px;
}
.content-page .back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--blue-600);
}

/* ------------------------------------------------------------ Footer */
.site-footer {
  border-top: 1px solid var(--ink-100);
  padding: 28px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-500);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.footer-links a[aria-disabled="true"] {
  color: var(--ink-300);
  cursor: default;
  pointer-events: none;
}

/* ------------------------------------------------------------ Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 21, 37, 0.55);
  backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  width: min(440px, calc(100% - 32px));
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 160ms ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-500);
  padding: 4px 8px;
}
.modal-close:hover { color: var(--ink-900); }

.modal h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.modal-lead {
  margin: 0 0 22px;
  color: var(--ink-500);
}
.modal-success {
  text-align: center;
  padding-top: 8px;
}
.modal-success h2 { color: var(--green-700); }
.modal-success p  { margin-bottom: 20px; }

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink-700);
}
.field-optional {
  color: var(--ink-300);
  font-weight: 400;
  font-size: 0.85em;
  margin-left: 4px;
}
.field input {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-900);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field input:focus {
  outline: 0;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(81, 97, 172, 0.18);
}

.field input.field-invalid,
.field input.field-invalid:focus {
  border-color: #B0271A;
  box-shadow: 0 0 0 3px rgba(176, 39, 26, 0.15);
}

.field-msg {
  display: block;
  min-height: 1.1em;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #B0271A;
  line-height: 1.3;
}

.form-error {
  background: #FFF1F0;
  color: #B0271A;
  border: 1px solid #F2C5BF;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 4px 0 12px;
  font-size: 0.95rem;
}

.btn-submit {
  width: 100%;
  margin-top: 4px;
}
.btn-spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn-submit[data-loading="true"] .btn-label   { opacity: 0.6; }
.btn-submit[data-loading="true"] .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Mobile */
@media (max-width: 540px) {
  .btn { width: 100%; min-width: 0; }
  .cta-row { flex-direction: column; }
  .hero { padding-top: 12px; padding-bottom: 64px; }
  .how-it-works { padding: 56px 20px 64px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
