/* ==========================================================================
   CoinDomus — corporate site styles
   Palette: white, Domus navy, signal blue. No external fonts or libraries.
   ========================================================================== */

:root {
  --white: #FFFFFF;
  --navy: #0E1F3D;
  --navy-2: #172C52;
  --ink: #14213D;
  --slate: #55627A;
  --blue: #2F5BEA;
  --blue-dark: #2149C9;
  --blue-soft: #8EADFF;
  --mist: #F2F5FA;
  --line: #DDE3EC;
  --amber: #E3A008;

  --font-display: "Avenir Next", "Avenir", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --radius-sm: 6px;
  --radius-lg: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-dark); }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; margin-inline: 0; }
.wrap.narrow { margin-inline: auto; max-width: calc(var(--wrap)); }
.wrap.narrow > * { max-width: 46rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: var(--white); padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--white); }
main:focus { outline: none; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.4rem;
  font: 600 1rem/1 var(--font-body);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.button-primary { background: var(--blue); color: var(--white); }
.button-primary:hover { background: var(--blue-dark); color: var(--white); }
.button-quiet { background: transparent; color: var(--navy); border-color: var(--line); }
.button-quiet:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- Status indicators ---------- */
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 3px rgba(227, 160, 8, .18);
  flex: none;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 600; color: var(--navy);
  padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-name { font: 600 1.25rem/1 var(--font-display); color: var(--navy); letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 0.5rem 0.85rem; border-radius: var(--radius-sm);
  color: var(--slate); text-decoration: none; font-weight: 500; font-size: 0.975rem;
}
.site-nav a:hover { color: var(--navy); background: var(--mist); }
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
/* "Launch App" in the header: a real button, not a text link (more specific than the link rules above) */
.site-nav a.nav-launch {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0.55rem 1.2rem;
  background: var(--blue); color: var(--white); font-weight: 600; font-size: 0.975rem;
}
.site-nav a.nav-launch:hover { background: var(--blue-dark); color: var(--white); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--white); cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 12px; width: 18px; height: 2px; background: var(--navy);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease; content: "";
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -6px; }
.nav-toggle-bar::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .js .nav-toggle { display: block; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(14, 31, 61, .08);
    display: none;
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { display: block; padding: 0.85rem 0.5rem; font-size: 1.0625rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .site-nav a.nav-launch { display: flex; justify-content: center; padding: 0.85rem 1.4rem; border-bottom: 0; border-radius: var(--radius-sm); font-size: 1.0625rem; }
  /* Without JavaScript the nav stays visible and simply wraps */
  html:not(.js) .header-inner { height: auto; flex-wrap: wrap; gap: .5rem; padding-block: .75rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: .75rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-tight { padding-top: clamp(2.5rem, 5vw, 4rem); }
.section-mist { background: var(--mist); }
.section-lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--slate); margin-top: 1rem; }
.section-navy .section-lede { color: #C3CEE3; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.split-head > p:not(.section-lede) { color: var(--slate); max-width: 34rem; }
.split-head .section-lede { margin-bottom: 1.25rem; }
@media (min-width: 961px) { .split-head { position: sticky; top: 7rem; } }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 8vw, 6.5rem); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.hero-status {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 2rem;
  font-size: 0.9375rem; font-weight: 600; color: var(--navy);
  background: #FFF8E6; border: 1px solid #F5DFA3; padding: 0.45rem 0.9rem; border-radius: 999px;
}
.hero-brand { font: 600 1.125rem/1 var(--font-display); color: var(--blue); margin-bottom: 1rem; letter-spacing: 0; }
.hero h1 { max-width: 13ch; }
.hero-lede { margin-top: 1.5rem; font-size: clamp(1.125rem, 1.7vw, 1.3rem); color: var(--slate); max-width: 36rem; line-height: 1.55; }
.hero-lede-sub { margin-top: 1rem; font-size: 1.0625rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
/* The prominent primary call to action */
.button-launch { min-height: 54px; padding: 0.9rem 2rem; font-size: 1.0625rem; box-shadow: 0 6px 18px rgba(47, 91, 234, .28); }
@media (max-width: 520px) { .hero-actions .button-launch { width: 100%; } }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* The custody flow: the one memorable element */
.flow {
  margin: 0; background: var(--navy); color: var(--white);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem);
  position: relative;
}
.flow-caption { font: 600 0.9375rem/1.3 var(--font-display); color: var(--blue-soft); margin-bottom: 1.75rem; }
.flow-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.flow-steps::before {
  content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--blue-soft), rgba(142, 173, 255, .35));
  transform-origin: top;
}
.flow-step { display: grid; grid-template-columns: 20px 1fr; gap: 1.1rem; position: relative; }
.flow-step + .flow-step { margin-top: 1.75rem; }
.flow-node {
  width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--navy); border: 2px solid var(--blue-soft); position: relative; z-index: 1;
}
.flow-step-brand .flow-node { border-radius: 5px; background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 5px rgba(47, 91, 234, .25); }
.flow-title { font: 600 1.0625rem/1.3 var(--font-display); color: var(--white); margin: 0 0 0.3rem; }
.flow-text { font-size: 0.9375rem; line-height: 1.5; color: #BFCBE2; margin: 0; }
.flow-note { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 0.8125rem; color: #93A3C2; }

@media (prefers-reduced-motion: no-preference) {
  .js .flow-steps::before { animation: flow-line 1.1s .35s cubic-bezier(.6, 0, .2, 1) both; }
  .js .flow-step { animation: flow-step .55s cubic-bezier(.2, .7, .2, 1) both; }
  .js .flow-step:nth-child(1) { animation-delay: .25s; }
  .js .flow-step:nth-child(2) { animation-delay: .7s; }
  .js .flow-step:nth-child(3) { animation-delay: 1.15s; }
}
@keyframes flow-line { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes flow-step { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Platform feature list ---------- */
.feature-list { margin: 0; border-top: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.feature dt { font: 600 1.125rem/1.35 var(--font-display); color: var(--navy); }
.feature dd { margin: 0; color: var(--slate); }
@media (max-width: 600px) { .feature { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- Navy control section ---------- */
.section-navy { background: var(--navy); color: #D5DDEC; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.control-head { max-width: 44rem; }
.control-list {
  list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.control-list li { padding: 2rem 2.5rem 2rem 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.control-list li:nth-child(even) { padding-left: 2.5rem; padding-right: 0; border-left: 1px solid rgba(255, 255, 255, .14); }
.control-list h3 { margin-bottom: 0.6rem; }
.control-list p { color: #B9C5DB; max-width: 32rem; }
@media (max-width: 760px) {
  .control-list { grid-template-columns: 1fr; }
  .control-list li, .control-list li:nth-child(even) { padding: 1.6rem 0; border-left: 0; }
}

/* ---------- Fee card ---------- */
.fee-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--white); }
.fee-card-title { font: 600 1.0625rem/1.3 var(--font-display); color: var(--navy); margin-bottom: 1.25rem; }
.fee-rows { margin: 0; }
.fee-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding-block: 1rem; border-top: 1px dashed var(--line); }
.fee-row dt { color: var(--ink); font-weight: 500; }
.fee-row dd { margin: 0; color: var(--slate); text-align: right; font-size: 0.9375rem; }
.fee-row-brand dt { color: var(--navy); font-weight: 600; }
.fee-row-brand dd { color: var(--blue); font-weight: 600; font-size: 1rem; }
.fee-card-note { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--slate); }
@media (max-width: 520px) { .fee-row { flex-direction: column; gap: 0.25rem; } .fee-row dd { text-align: left; } }

/* ---------- Global vision ---------- */
.section-mist .narrow p:not(.section-lede) { color: var(--slate); }

/* ---------- Availability notice ---------- */
.notice {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 3rem; align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
}
.notice-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.notice h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); max-width: 34ch; margin-bottom: 1rem; }
.notice p { color: var(--slate); max-width: 46rem; }
@media (max-width: 760px) { .notice { grid-template-columns: 1fr; } .notice-actions { justify-self: start; } }

/* ---------- Inner page intro ---------- */
.page-intro { padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-intro h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.legal-meta { margin-top: 1rem; color: var(--slate); font-size: 0.9375rem; }
.page-404 { border-bottom: 0; padding-bottom: var(--section); }
.page-404 .button { margin-top: 1rem; }

/* ---------- Facts / company details ---------- */
.facts { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }
.facts-title { font-size: 1.1875rem; margin-bottom: 0.5rem; }
.facts dl, .contact-details dl { margin: 0; }
.fact { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact dt { color: var(--slate); font-size: 0.9375rem; }
.fact dd { margin: 0; font-weight: 600; color: var(--navy); overflow-wrap: break-word; min-width: 0; }
.contact-details .fact { grid-template-columns: 1fr; gap: 0.2rem; }
@media (max-width: 520px) { .fact { grid-template-columns: 1fr; gap: 0.15rem; } }

.prose { max-width: 42rem; }
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 0.85rem; }
.split-head.prose h2 { margin-top: 0; }
.prose p, .prose li { color: #2D3A55; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4rem; }

.principles {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem;
}
.principles li { border-top: 2px solid var(--navy); padding-top: 1.25rem; }
.principles h3 { margin-bottom: 0.6rem; }
.principles p { color: var(--slate); }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Contact ---------- */
.split-contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
@media (max-width: 960px) { .split-contact { grid-template-columns: 1fr; } }
.contact-company { font-size: 1.5rem; margin-bottom: 1rem; }
.contact-email { font-weight: 600; }
.contact-note { margin-top: 1.5rem; padding: 1rem 1.15rem; background: var(--mist); border-radius: var(--radius-sm); font-size: 0.9375rem; color: var(--slate); }

.contact-form { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 0.4rem; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #C9D2E0; border-radius: var(--radius-sm); padding: 0.75rem 0.85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 91, 234, .2); }
.field [aria-invalid="true"] { border-color: #C0392B; }
.field-error { color: #B42318; font-size: 0.875rem; margin: 0.4rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-help { margin-top: 1rem; font-size: 0.875rem; color: var(--slate); }
.form-status { margin-top: 0.75rem; font-weight: 600; color: var(--navy); }
.form-status:empty { display: none; }
.form-status.is-error { color: #B42318; }
.contact-form .button { width: 100%; }
@media (min-width: 600px) { .contact-form .button { width: auto; } }

/* ---------- Legal pages ---------- */
.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.legal-toc { position: sticky; top: 6.5rem; font-size: 0.9rem; }
.legal-toc-title { font-weight: 600; color: var(--navy); margin-bottom: 0.75rem; }
.legal-toc ol { margin: 0; padding-left: 1.25rem; color: var(--slate); }
.legal-toc li { margin-bottom: 0.45rem; }
.legal-toc a { color: var(--slate); text-decoration: none; }
.legal-toc a:hover { color: var(--blue); text-decoration: underline; }
.legal-body h2 { scroll-margin-top: 6rem; }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; }
  .legal-toc { position: static; padding: 1.25rem; background: var(--mist); border-radius: var(--radius-sm); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #B9C5DB; padding: clamp(3rem, 6vw, 4.5rem) 0 calc(2rem + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-company { font: 600 1.25rem/1.2 var(--font-display); color: var(--white); margin-bottom: 0.35rem; }
.footer-tagline { color: var(--blue-soft); margin-bottom: 1.25rem; }
.footer-status { font-size: 0.9375rem; max-width: 30rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-nav a { color: var(--white); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; color: var(--white); }
.footer-legal { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.5rem; font-size: 0.8125rem; color: #93A3C2; }
.footer-legal p { margin: 0; }
.site-footer :focus-visible { outline-color: var(--blue-soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
