/* Styles for the ExChord landing page: tokens, layout, hero chart, form and sections. */
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url("../fonts/fira-sans-regular.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url("../fonts/fira-sans-semibold.woff2") format("woff2"); }
/* Bold is subset to the glyphs of a zł amount: only the kept-margin figure uses it. */
@font-face { font-family: "Fira Sans"; font-weight: 700; font-display: swap; src: url("../fonts/fira-sans-bold.woff2") format("woff2"); }

:root {
  --navy: #283890;
  --navy-dark: #1f2c74;
  --navy-tint: #e9ebf7;
  --grey: #bcbdbf;
  --band: #f4f5f7;
  --ink: #14183a;
  --muted: #5b5f7a;
  --white: #fff;
  --wrap: 1264px;
  --gutter: 24px;
  --radius: 8px;
  --ease: 150ms ease-out;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Fira Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 26px;
  color: var(--ink);
  background: var(--white);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--navy); color: var(--white); }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--ease); }
a:hover { color: var(--navy-dark); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: 44px; line-height: 52px; font-weight: 600; color: var(--navy); letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 32px; line-height: 40px; font-weight: 600; text-wrap: balance; }
h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
p { text-wrap: pretty; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 88px 0; scroll-margin-top: 88px; }
.band { background: var(--band); }
.section-lead { font-size: 19px; line-height: 30px; color: var(--muted); max-width: 62ch; margin-top: 16px; }
/* In full-width sections the lead spans the column grid below it, in balanced lines. */
.wrap > .section-lead { max-width: none; text-wrap: balance; }

/* Buttons and form */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1;
  color: var(--white); background: var(--navy);
  border: 0; border-radius: var(--radius); cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background var(--ease), transform var(--ease);
}
.btn:hover { background: var(--navy-dark); color: var(--white); }
.btn:active { transform: translateY(1px); }
.form label { display: block; font-weight: 600; font-size: 15px; line-height: 22px; margin-bottom: 8px; }
.form-row { display: flex; gap: 12px; }
.form input {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius);
  caret-color: var(--navy);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form input::placeholder { color: var(--muted); }
.form input:hover { border-color: var(--muted); }
.form input:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-tint); }
.form input:user-invalid { border-color: #b3261e; }
.form input:user-invalid:focus { box-shadow: 0 0 0 3px #f7dedc; }
.form-note { font-size: 14px; line-height: 21px; color: var(--muted); margin-top: 12px; }
.form-note a[href^="tel:"] { font-size: 16px; font-weight: 600; white-space: nowrap; }
.form-trap { display: none; }
.form-status:not(:empty) { margin-top: 12px; font-weight: 600; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: var(--white); border-bottom: 1px solid var(--band); }
.nav-row { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: flex; line-height: 0; }
.nav-links { display: flex; gap: 28px; margin-left: 16px; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 16px; }
.nav-links a:hover { color: var(--navy); }

/* Hero */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: center; }
.hero-copy { grid-column: 1 / 7; }
.hero-chart { grid-column: 7 / 13; padding-top: 12px; }
.lead { font-size: 19px; line-height: 30px; margin-top: 20px; max-width: 34em; }
.hero .form { margin-top: 32px; padding: 24px; background: var(--white); border: 1px solid var(--band); border-radius: 12px; box-shadow: 0 2px 8px rgba(20, 24, 58, 0.08); }

/* Hero chart */
.chart-body { display: grid; gap: 16px; margin-top: 16px; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--muted); font-size: 17px; }
.chart .grid { stroke: #e3e5ec; stroke-width: 1; }
.chart .line { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .panel { fill: var(--ink); font-size: 16px; font-weight: 600; }
.chart .zero { stroke: var(--muted); stroke-width: 1; }
.chart .bar path { transition: opacity var(--ease); }
/* Orange hints at the risk of an unhedged month without calling it a loss. */
.chart .spot.up { fill: #c96a1b; }
.chart .spot.down { fill: #b3261e; }
.chart .hedged.up { fill: #0f4d2f; }
.chart .hedged.down { fill: #7a1712; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; line-height: 20px; color: var(--muted); }
.chart-legend li { display: flex; align-items: center; gap: 8px; }
.chart-legend .key { width: 14px; height: 14px; border-radius: 2px; }
.chart-legend .spot { background: #c96a1b; }
.chart-legend .hedged { background: #0f4d2f; }
.chart .bar:hover path { opacity: 0.8; }
.chart .bar:hover .cap { display: inline; }
.sim-label { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--muted); }
.sim-summary { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 24px; margin-top: 12px; }
.sim-summary dt { font-size: 13px; line-height: 18px; color: var(--muted); }
.sim-summary dd { font-size: 18px; line-height: 26px; font-weight: 600; }
.sim-summary .loss dd { color: #b3261e; }
.sim-summary .gain dd { color: #1e7d4f; }
.sim-summary .kept dd { color: #0f4d2f; font-weight: 700; }
.sim-summary .hedged-result dd { color: #7a1712; }
/* Inputs sit in the middle row on the left, results without and with a forward on the right. */
.sim-summary .turnover { grid-area: 2 / 1; }
.sim-summary .planned { grid-area: 2 / 2; }
.sim-summary .achieved { grid-area: 1 / 3; }
.sim-summary .loss, .sim-summary .gain { grid-area: 1 / 4; }
.sim-summary .hedged { grid-area: 2 / 3; }
.sim-summary .hedged-result { grid-area: 2 / 4; }
.sim-summary .kept { grid-area: 3 / 4; }
.sim-summary::before { content: ""; grid-area: 1 / 3 / 4 / 3; margin-left: -12px; border-left: 1px solid var(--grey); }
.chart .hit { fill: transparent; }
.chart .cross, .chart .dot, .chart .cap { display: none; }
.chart .cross { stroke: var(--grey); stroke-width: 1; }
.chart .dot { fill: var(--navy); stroke: var(--white); stroke-width: 2; }
.chart .cap { fill: var(--ink); font-size: 17px; font-weight: 600; }
.chart .pt:hover .cross, .chart .pt:hover .dot, .chart .pt:hover .cap { display: inline; }
.hero-chart figcaption { font-size: 14px; line-height: 21px; color: var(--muted); margin-top: 8px; }

.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Problem numbers */
.problem-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
.numbers { padding-top: 24px; border-top: 1px solid var(--grey); }
.numbers dt { font-size: 40px; line-height: 48px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.numbers dd { margin-top: 12px; font-size: 16px; line-height: 25px; color: var(--muted); }

/* Steps */
.steps-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: 48px; }
.steps-list li { padding-top: 20px; border-top: 1px solid var(--grey); }
.steps-list .ico { width: 32px; height: 32px; }
.steps-list h3 { margin-top: 16px; }
.steps-list p { margin-top: 8px; font-size: 16px; line-height: 25px; color: var(--muted); }

/* Who */
.who-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.who-list li { padding: 20px 0; border-top: 1px solid var(--grey); font-size: 16px; line-height: 25px; color: var(--muted); }
.who-list li:last-child { border-bottom: 1px solid var(--grey); }
.who-list strong { display: block; color: var(--ink); font-size: 18px; line-height: 27px; margin-bottom: 4px; }

/* Case */
.case-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
.case-steps { margin-top: 32px; display: grid; grid-template-columns: 9em 1fr; gap: 16px 24px; }
.case-steps dt { font-weight: 600; }
.case-steps dd { color: var(--muted); font-size: 16px; line-height: 25px; }
.case-text > a { display: inline-block; margin-top: 28px; font-weight: 600; }
.quote { padding: 32px; background: var(--band); border-radius: 12px; }
.refs li { padding: 20px 0; border-top: 1px solid var(--grey); }
.refs li:first-child { margin-top: 16px; }
.refs li:last-child { padding-bottom: 0; }
.refs blockquote p { font-size: 18px; line-height: 28px; }
.ref-who { margin-top: 12px; font-size: 15px; line-height: 22px; color: var(--muted); }
.ref-who strong { color: var(--ink); }

/* Trust */
.small-h { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
/* Each row splits the full width into equal cells, so 4 clients and 3 partners both span the page. */
.logos { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; justify-items: center; gap: 24px; margin: 24px 0 48px; }
.logos:last-child { margin-bottom: 0; }
.logos a { display: block; padding: 8px; }
.logos img { display: block; transition: opacity var(--ease); }
.logos a:hover img { opacity: 0.7; }

/* Team */
.team-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: 40px; }
.team-list li { padding-top: 24px; border-top: 1px solid var(--grey); }
/* Grey photos: the three source shoots have unrelated backdrop colours. */
.team-list img { display: block; margin-bottom: 16px; border-radius: var(--radius); background: var(--band); }
.team-list strong { display: block; font-size: 20px; line-height: 28px; }
.team-list span { color: var(--muted); font-size: 16px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 6fr 6fr; gap: 64px; align-items: center; }
.contact-direct { margin-top: 24px; }
.contact-direct a[href^="tel:"] { font-weight: 600; white-space: nowrap; }
.contact .form { padding: 32px; background: var(--white); border: 1px solid var(--band); border-radius: 12px; box-shadow: 0 2px 8px rgba(20, 24, 58, 0.08); }

/* Privacy policy page */
.doc { padding: 64px 0 96px; }
.doc-body { max-width: 72ch; }
.doc-date { color: var(--muted); margin-top: 8px; }
.doc section { padding: 0; margin-top: 48px; }
.doc h2 { font-size: 26px; line-height: 34px; margin-bottom: 16px; }
.doc h3 { margin: 32px 0 12px; }
.doc p + p, .doc p + .doc-list, .doc .doc-list + p { margin-top: 16px; }
.doc-facts { display: grid; grid-template-columns: 112px 1fr; gap: 8px 24px; padding: 20px 24px; background: var(--band); border-radius: var(--radius); }
.doc-facts dt { font-weight: 600; color: var(--muted); font-size: 15px; }
.doc-facts + p { margin-top: 24px; }
.doc-list { list-style: decimal; padding-left: 24px; }
.doc-list li + li { margin-top: 8px; }
.doc-list li::marker { color: var(--muted); }

/* Footer */
.footer { background: var(--navy); color: var(--white); padding: 48px 0; font-size: 14px; line-height: 21px; }
.footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 3fr 7fr 2fr; gap: var(--gutter); }
.footer .legal { color: #c9cdea; }
.footer .copy { text-align: right; color: #c9cdea; }

/* Phone and narrow desktop */
@media (max-width: 1023px) {
  section { padding: 64px 0; }
  .hero-copy, .hero-chart { grid-column: 1 / -1; }
  .hero-chart { padding-top: 32px; }
  .problem-grid, .who-grid, .case-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer .copy { text-align: left; }
}
/* Phone layout is screen-only: an A4 page is narrower than 767 px but should print the tablet layout. */
@media screen and (max-width: 767px) {
  :root { --gutter: 16px; }
  h1 { font-size: 32px; line-height: 40px; }
  h2 { font-size: 26px; line-height: 34px; }
  body { font-size: 16px; line-height: 25px; }
  .lead, .section-lead { font-size: 17px; line-height: 27px; }
  .nav-row { flex-wrap: wrap; height: auto; padding: 12px var(--gutter); gap: 0 16px; }
  section { scroll-margin-top: 118px; }
  /* Bottom padding keeps the focus ring inside the scroll box; the negative margin cancels its height. */
  .nav-links { order: 3; width: 100%; margin: 12px 0 -12px; padding-bottom: 12px; gap: 20px; overflow-x: auto; white-space: nowrap; font-size: 15px; }
  .hero { padding: 40px 0 56px; }
  .hero .form { padding: 16px; }
  .form-row { flex-direction: column; }
  /* In a column, flex: 1 would size the field from zero and ignore its 48px height. */
  .form-row input { flex: none; }
  .chart .axis { font-size: 21px; }
  .chart .month.alt { display: none; }
  .chart .cap { font-size: 20px; }
  .chart .panel { font-size: 20px; }
  .sim-summary { grid-template-columns: repeat(2, auto); gap: 8px 16px; }
  .sim-summary > [class] { grid-area: auto; }  /* outranks the desktop placement classes */
  .sim-summary .kept { grid-column: 2; }
  .sim-summary::before { display: none; }
  .numbers, .steps-list, .team-list { grid-template-columns: 1fr; }
  .logos { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .numbers > div + div, .steps-list li + li { margin-top: 8px; }
  .numbers dt { font-size: 32px; line-height: 40px; }
  .case-steps { grid-template-columns: 1fr; gap: 4px 0; }
  .case-steps dd { margin-bottom: 12px; }
  .quote { padding: 24px; }
  .contact .form { padding: 20px; }
  .doc { padding: 40px 0 64px; }
  .doc h2 { font-size: 22px; line-height: 30px; }
  .doc-facts { grid-template-columns: 1fr; gap: 0; padding: 16px; }
  .doc-facts dd + dt { margin-top: 12px; }
}

/* Print: A4, tablet layout from the 1023 px query, no card or heading split across pages. */
@media print {
  @page { size: A4; margin: 12mm; }
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nav { position: static; }
  .nav-links { display: none; }
  section:not(.hero) { break-inside: avoid; }
  section { padding: 36px 0; }
  .hero { padding: 24px 0 32px; }
  h1, h2, h3, .section-lead { break-after: avoid; }
  .form, .hero-chart, .quote, .numbers > div, .steps-list li, .who-list li, .team-list li, .case-steps, .logos, .footer { break-inside: avoid; }
}
