/* ============================================================
   OptionMarket London — styles
   Premium, institutional, minimal.
   ============================================================ */

:root {
  --ink: #16222c;
  --ink-deep: #0f1820;
  --muted: #5b6a75;
  --paper: #fbfaf7;
  --stone: #f1eee8;
  --line: #e2ded4;
  --line-dark: rgba(251, 250, 247, 0.16);
  --accent: #8a6d3f;
  --accent-soft: rgba(138, 109, 63, 0.12);
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

.container {
  width: min(1180px, 90%);
  margin-inline: auto;
}

.container-narrow { width: min(780px, 90%); }

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; line-height: 1.3; }

p { max-width: 68ch; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.3rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.75;
}

.small { font-size: 0.85rem; color: var(--muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
}

.btn:hover { background: var(--ink); color: var(--paper); }

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover { background: var(--ink-deep); border-color: var(--ink-deep); }

.btn-light {
  border-color: rgba(251, 250, 247, 0.5);
  color: var(--paper);
}

.btn-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.btn-small { padding: 0.6rem 1.4rem; font-size: 0.82rem; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.text-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.15s ease;
}

.text-link:hover { color: var(--accent); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.15rem;
}

.logo {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.logo .logo-city {
  display: inline-block;
  margin-left: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  transform: translateY(-1px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 450;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.site-nav a:hover { opacity: 1; }

.site-nav a[aria-current="page"] {
  opacity: 1;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

.site-nav .btn { opacity: 1; }

.site-nav a.btn-solid { color: var(--paper); }

.site-nav a.btn-solid:hover { color: var(--paper); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(5rem, 13vh, 9.5rem) 0 clamp(4rem, 10vh, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: end;
}

.hero h1 { max-width: 15em; }

.hero .lead { margin-top: 2rem; max-width: 34em; }

.hero-actions {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-aside {
  border-left: 1px solid var(--line);
  padding-left: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.hero-aside .principle strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.hero-aside .principle span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Page hero (inner pages) */

.page-hero {
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(2.5rem, 6vh, 4rem);
  border-bottom: 1px solid var(--line);
}

.page-hero .lead { margin-top: 1.6rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 10vh, 7rem) 0; }

.section-stone { background: var(--stone); }

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-dark .lead,
.section-dark p { color: rgba(251, 250, 247, 0.72); }

.section-dark h2, .section-dark h3 { color: var(--paper); }

.section-head { margin-bottom: 3.2rem; max-width: 46em; }

.section-head .lead { margin-top: 1.2rem; }

.rule { border: 0; border-top: 1px solid var(--line); }

/* ---------- Grids & cards ---------- */

.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.cell {
  background: var(--paper);
  padding: 2.2rem 2rem;
}

.section-stone .cell { background: var(--stone); }

.cell h3 { font-size: 1.15rem; margin-bottom: 0.7rem; }

.cell p { font-size: 0.92rem; color: var(--muted); }

.cell .cell-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

/* ---------- Journey (How It Works) ---------- */

.journey { display: flex; flex-direction: column; }

.journey-step {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
}

.journey-step:last-child { border-bottom: 1px solid var(--line); }

.journey-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.journey-step h3 { font-size: 1.3rem; }

.journey-step .journey-detail p { color: var(--muted); font-size: 0.95rem; }

.journey-step .journey-detail p + p { margin-top: 0.8rem; }

/* ---------- Option timeline diagram ---------- */

.diagram {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.5rem;
}

.diagram-caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1.8rem;
  max-width: 60ch;
}

.timeline-bar {
  display: grid;
  grid-template-columns: 1fr 2.2fr 1fr;
  text-align: center;
}

.timeline-bar .phase {
  padding: 1.1rem 1rem 1.4rem;
  border-top: 3px solid var(--line);
  position: relative;
}

.timeline-bar .phase::before {
  content: "";
  position: absolute;
  top: -6.5px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}

.timeline-bar .phase:last-child::after {
  content: "";
  position: absolute;
  top: -6.5px;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent);
}

.timeline-bar .phase-mid { border-top-color: var(--accent); }

.timeline-bar strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
}

.timeline-bar span { font-size: 0.82rem; color: var(--muted); }

/* ---------- Comparison table ---------- */

.compare {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2.5rem;
  font-size: 0.93rem;
}

.compare th, .compare td {
  text-align: left;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--line);
  vertical-align: top;
}

.compare thead th {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  background: var(--stone);
}

.compare tbody th {
  font-weight: 550;
  font-size: 0.85rem;
  color: var(--muted);
  width: 18%;
  background: var(--stone);
}

.compare td { color: var(--ink); width: 41%; }

.table-scroll { overflow-x: auto; }

/* ---------- Opportunities ---------- */

.opportunity {
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 2.5rem;
}

.opportunity-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 2rem 2.4rem 0;
}

.opportunity-head h3 { font-size: 1.45rem; }

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.tag-accent { border-color: var(--accent); color: var(--accent); }

.opportunity-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  padding: 1.6rem 2.4rem 2.4rem;
}

.opportunity .summary { color: var(--muted); font-size: 0.95rem; }

.spec {
  list-style: none;
  font-size: 0.9rem;
}

.spec li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.spec li:first-child { border-top: 1px solid var(--line); }

.spec .k { color: var(--muted); white-space: nowrap; }

.spec .v { text-align: right; font-weight: 500; }

.milestones {
  list-style: none;
  margin-top: 1.4rem;
  font-size: 0.88rem;
}

.milestones li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.6rem;
  color: var(--muted);
}

.milestones li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.95em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.milestones li.done::before { background: var(--accent); }

.opportunity-foot {
  border-top: 1px solid var(--line);
  padding: 1.4rem 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.opportunity-foot .small { max-width: 46ch; }

/* ---------- FAQ ---------- */

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-item summary {
  padding: 1.5rem 3rem 1.5rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item .faq-body {
  padding: 0 0 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

.faq-item .faq-body p + p { margin-top: 0.8rem; }

/* ---------- Forms ---------- */

.form-panel {
  border: 1px solid var(--line);
  background: #fff;
  padding: clamp(1.8rem, 4vw, 3rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.form-row-single { grid-template-columns: 1fr; }

.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-field .optional { text-transform: none; letter-spacing: 0; font-weight: 400; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 0;
}

.form-field textarea { resize: vertical; min-height: 120px; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 1px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.form-field input.invalid,
.form-field select.invalid { border-color: #b3543f; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.form-check input { margin-top: 0.3rem; accent-color: var(--accent); }

.form-message {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  min-height: 1.5em;
}

.form-message.success { color: var(--accent); }
.form-message.error { color: #b3543f; }

/* Honeypot: visually removed, still present for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- CTA band ---------- */

.cta-band { text-align: left; }

.cta-band .cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.cta-band h2 { max-width: 18em; }

.cta-band .cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }

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

.site-footer {
  background: var(--ink-deep);
  color: rgba(251, 250, 247, 0.65);
  padding: 4rem 0 2.2rem;
  font-size: 0.85rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--line-dark);
}

.footer-brand .logo { color: var(--paper); font-size: 1.15rem; }

.footer-brand p { margin-top: 1rem; max-width: 34em; color: rgba(251, 250, 247, 0.5); }

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 250, 247, 0.45);
  margin-bottom: 1.1rem;
}

.footer-col a {
  display: block;
  color: rgba(251, 250, 247, 0.7);
  text-decoration: none;
  padding: 0.28rem 0;
}

.footer-col a:hover { color: var(--paper); }

.footer-legal {
  padding-top: 2rem;
  color: rgba(251, 250, 247, 0.42);
  font-size: 0.78rem;
}

.footer-legal p + p { margin-top: 0.6rem; }

.footer-legal .footnote { max-width: 90ch; }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 2rem;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2.5rem;
  }
  .journey-step { grid-template-columns: 70px 1fr; }
  .journey-step .journey-detail { grid-column: 2; }
  .opportunity-body { grid-template-columns: 1fr; gap: 2rem; }
  .cta-band .cta-inner { grid-template-columns: 1fr; }
  .cta-band .cta-actions { justify-content: flex-start; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.6rem 5%;
  }

  .site-nav.open { display: flex; }

  .site-nav a { padding: 0.85rem 0; width: 100%; opacity: 1; }

  .site-nav a[aria-current="page"] { border-bottom: 0; color: var(--accent); }

  .site-nav .btn { margin: 0.8rem 0 1.2rem; text-align: center; }

  .nav-toggle { display: flex; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .timeline-bar { grid-template-columns: 1fr; text-align: left; }
  .timeline-bar .phase { border-top: 0; border-left: 3px solid var(--line); padding: 0.8rem 0 0.8rem 1.4rem; }
  .timeline-bar .phase::before { top: 0.2rem; left: -6.5px; }
  .timeline-bar .phase:last-child::after { display: none; }
  .timeline-bar .phase-mid { border-left-color: var(--accent); }
  .journey-step { grid-template-columns: 1fr; gap: 0.8rem; }
  .journey-step .journey-detail { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr; }
}
