/* ==========================================================
   Agility FX — shared styles
   Palette: white, sky wash, ice blue, azure, deep ink blue
   ========================================================== */

:root {
  --white: #ffffff;
  --sky-wash: #eef6fd;
  --ice: #d9ebfa;
  --ice-deep: #b9d9f3;
  --azure: #1b6fbf;
  --azure-bright: #3a9be8;
  --aqua: #6fd0f2;
  --ink: #0f2a4a;
  --ink-soft: #46607f;
  --line: #d3e4f4;
  --ok: #17835a;
  --ok-bg: #e7f7f0;
  --warn-bg: #fff8e6;
  --warn-line: #f0d98a;
  --warn-ink: #6b5200;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-lg: 22px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--azure); }

:focus-visible {
  outline: 3px solid var(--azure-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 650; }
p + p { margin-top: 1em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap; padding: 8px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.main-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 550; font-size: 0.95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--azure); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font: 650 1rem var(--font-body); cursor: pointer; text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.btn-primary { background: var(--azure); color: var(--white); }
.btn-primary:hover { background: var(--ink); }
.btn-outline { background: var(--white); color: var(--azure); border-color: var(--ice-deep); }
.btn-outline:hover { border-color: var(--azure); background: var(--sky-wash); }
.btn-small { padding: 9px 18px; font-size: 0.92rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, var(--ice) 0%, rgba(217, 235, 250, 0) 60%),
    var(--sky-wash);
  padding: 80px 0 90px;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-logo {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid; place-items: center;
  box-shadow: 0 30px 60px -30px rgba(27, 111, 191, 0.35);
  min-height: 280px;
}
.hero-logo img { width: 100%; max-width: 340px; height: auto; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--sky-wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 44px; max-width: 62ch; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
.about-copy p { color: var(--ink-soft); }
.principles { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.principles li {
  list-style: none; background: var(--ice); color: var(--ink);
  padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
}

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px; display: flex; flex-direction: column; gap: 14px;
}
.service p { color: var(--ink-soft); flex: 1; }
.service .btn { align-self: flex-start; margin-top: 8px; }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--ice);
  display: grid; place-items: center; color: var(--azure);
}
.service-icon svg { width: 26px; height: 26px; }

/* Editions: staircase of tiers */
.stairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: end; }
.edition {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.edition:nth-child(2) { padding-top: 44px; border-color: var(--ice-deep); }
.edition:nth-child(3) { padding-top: 62px; border-color: var(--azure-bright); box-shadow: 0 24px 50px -28px rgba(27, 111, 191, 0.5); }
.edition-img {
  aspect-ratio: 16 / 10; border-radius: var(--radius-md); overflow: hidden;
  background: linear-gradient(135deg, var(--ice), var(--sky-wash));
}
.edition-img img { width: 100%; height: 100%; object-fit: cover; }
.edition-tier { font-size: 0.9rem; font-weight: 600; color: var(--azure); }
.edition h3 { font-size: 1.5rem; }
.edition-price { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; letter-spacing: -0.03em; }
.edition-blurb { color: var(--ink-soft); font-size: 0.98rem; }
.feature-list { list-style: none; display: grid; gap: 8px; font-size: 0.95rem; }
.feature-list li { position: relative; padding-left: 26px; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--azure-bright); border-bottom: 2.5px solid var(--azure-bright);
  transform: rotate(-45deg) translateY(-50%);
}
.best-for { background: var(--sky-wash); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.92rem; color: var(--ink-soft); }
.best-for strong { color: var(--ink); }
.edition .btn { margin-top: auto; }
.editions-note { margin-top: 36px; color: var(--ink-soft); max-width: 64ch; }

/* ---------- Pool Trading ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid rgba(23, 131, 90, 0.25);
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 700; letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ok);
}

.plan-groups {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start;
}
.plan-group {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
.plan-group-head {
  background: var(--sky-wash); border-bottom: 1px solid var(--line);
  padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.plan-group-head h3 { font-size: 1.15rem; }
.plan-badge {
  background: var(--ice); color: var(--azure); font-size: 0.8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.plan-table-wrap { width: 100%; overflow-x: auto; }
.plan-table { width: 100%; border-collapse: collapse; }
.plan-table th {
  text-align: left; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-soft); padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.plan-table td {
  padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 0.98rem;
}
.plan-table tr:last-child td { border-bottom: 0; }
.plan-table tr.selected-plan { background: var(--sky-wash); }
.plan-cap { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.plan-roi { font-family: var(--font-display); font-weight: 700; color: var(--ok); }
.plan-table td:last-child { text-align: right; }

/* Deposit / Withdraw Tabs */
.tab-bar {
  display: inline-flex; background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px; gap: 6px; margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 24px; border-radius: 999px; border: 0; background: transparent;
  font: 650 0.96rem var(--font-body); color: var(--ink-soft); cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn[aria-selected="true"] { background: var(--azure); color: var(--white); }

/* ---------- Risk note + footer ---------- */
.risk {
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  border-radius: var(--radius-md); padding: 18px 22px; font-size: 0.92rem;
}
.site-footer { background: var(--ink); color: #c9dcf0; padding: 48px 0 36px; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-fine { font-size: 0.85rem; color: #93b2d3; border-top: 1px solid #28466b; padding-top: 20px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  border-top: 1px solid #28466b; padding-top: 20px;
}
.footer-bottom .footer-fine {
  border-top: 0; padding-top: 0;
}

/* ---------- Certificate popup ---------- */
.cert-modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
}
.cert-modal[hidden] { display: none; }
.cert-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 42, 74, 0.72);
  backdrop-filter: blur(4px);
}
.cert-modal-box {
  position: relative; z-index: 1;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  max-width: 780px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(15, 42, 74, 0.55);
}
.cert-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--sky-wash);
}
.cert-close-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ice-deep);
  background: var(--white); color: var(--ink); font-size: 1.4rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.cert-close-btn:hover { background: var(--ice); }
.cert-modal-body {
  padding: 20px; overflow: auto; display: grid; place-items: center;
  background: var(--sky-wash);
}
.cert-modal-body img {
  max-width: 100%; max-height: 72vh; width: auto; height: auto;
  border-radius: var(--radius-sm);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  pointer-events: none;
}

/* ---------- Inner pages ---------- */
.page-hero { background: var(--sky-wash); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 14px; }
.crumbs { font-size: 0.9rem; margin-bottom: 14px; }
.crumbs a { text-decoration: none; }

.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px;
}
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 1.5rem; margin-bottom: 8px; }
.panel > p { color: var(--ink-soft); margin-bottom: 20px; }

.step-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.step-title .dot {
  width: 32px; height: 32px; border-radius: 50%; background: var(--azure); color: #fff;
  display: grid; place-items: center; font: 700 0.95rem var(--font-display); flex: none;
}
.step-title h2 { margin: 0; }

/* Choice buttons (edition + coin pickers) */
.choice-grid { display: grid; gap: 12px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice-grid.four { grid-template-columns: repeat(4, 1fr); }
.choice {
  text-align: left; background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius-md); padding: 16px 18px; cursor: pointer; font: inherit; color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--ice-deep); }
.choice[aria-pressed="true"] { border-color: var(--azure); background: var(--sky-wash); }
.choice strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.choice span { color: var(--ink-soft); font-size: 0.92rem; }

/* Address box */
.pay-summary { margin-top: 22px; background: var(--sky-wash); border-radius: var(--radius-md); padding: 20px 22px; }
.pay-summary p { color: var(--ink); margin: 0; }
.addr-row { display: flex; gap: 10px; margin-top: 14px; align-items: stretch; flex-wrap: wrap; }
.addr {
  flex: 1; min-width: 220px; background: var(--white); border: 1px solid var(--ice-deep);
  border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--font-mono);
  font-size: 0.9rem; word-break: break-all; user-select: all;
}
.copy-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Static address list (not used for payment picker) */
.notice {
  margin-top: 18px; border-left: 4px solid var(--azure-bright); background: var(--sky-wash);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.94rem; color: var(--ink-soft);
}

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea, .field select {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--ice-deep);
  border-radius: var(--radius-sm); background: var(--white); color: var(--ink); width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--aqua); border-color: var(--azure); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Screenshot upload */
.file-input { padding: 10px 12px !important; background: var(--sky-wash) !important; border-style: dashed !important; cursor: pointer; }
.file-input::file-selector-button {
  font: 600 0.92rem var(--font-body); margin-right: 12px; padding: 8px 16px;
  border: 0; border-radius: 999px; background: var(--azure); color: #fff; cursor: pointer;
}
.file-input::file-selector-button:hover { background: var(--ink); }
.shot-preview {
  display: flex; align-items: center; gap: 16px; margin-top: 10px;
  background: var(--sky-wash); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px;
}
.shot-preview[hidden] { display: none; }
.shot-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--ice-deep); }
.shot-preview strong { display: block; margin-bottom: 8px; word-break: break-all; font-size: 0.95rem; }

/* Two-column layout for inner pages */
.split { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 24px; align-items: start; }
.aside-list { list-style: none; display: grid; gap: 14px; }
.aside-list li { padding-left: 0; color: var(--ink-soft); font-size: 0.95rem; }
.aside-list strong { display: block; color: var(--ink); }

/* Admin contact card */
.contact-card { display: none; }
.contact-card.open { display: block; animation: reveal 0.35s ease; }
.contact-line {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.contact-line:last-of-type { border-bottom: 0; }
.contact-line small { display: block; color: var(--ink-soft); font-size: 0.85rem; }
.contact-line b { font-family: var(--font-display); font-size: 1.1rem; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Floating support */
.support-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  background: var(--azure); color: #fff; border-radius: 999px; padding: 12px 20px;
  font-weight: 650; text-decoration: none; box-shadow: 0 12px 30px -10px rgba(15, 42, 74, 0.5);
}
.support-fab:hover { background: var(--ink); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .split { grid-template-columns: 1fr; gap: 36px; }
  .services-grid, .plan-groups { grid-template-columns: 1fr; }
  .stairs { grid-template-columns: 1fr; }
  .edition:nth-child(2), .edition:nth-child(3) { padding-top: 26px; }
  .choice-grid.three, .choice-grid.four { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
}
@media (max-width: 520px) {
  .choice-grid.three, .choice-grid.four { grid-template-columns: 1fr; }
  .panel, .service { padding: 24px; }
  .main-nav { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .contact-card.open { animation: none; }
}