/* Future Media Math LLP — company website
   Navy sampled from the FMM logo (#054190). One working typeface (Public Sans);
   Montserrat is used only for the company name, to match the logo wordmark. */

:root {
  --navy: #054190;
  --navy-deep: #032e66;
  --ink: #16202e;
  --body: #3a4556;
  --muted: #667085;
  --line: #dde3ec;
  --tint: #f3f6fa;
  --paper: #ffffff;
  --todo: #fff1b8;

  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Montserrat", var(--sans);

  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (pointer: fine) { html { overscroll-behavior: none; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 1.0625rem/1.65 var(--sans);
  font-feature-settings: "kern";
  -webkit-tap-highlight-color: rgba(5, 65, 144, 0.12);
  touch-action: manipulation;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--ink); text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: 1.5rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--navy); color: #fff; padding: 0.5rem 0.9rem; border-radius: 4px; text-decoration: none;
}
.skip:focus-visible { top: 1rem; color: #fff; }

/* Draft marker — remove the element once FMM approves the content */
.draft-banner { background: var(--todo); color: #5c4a00; font-size: 0.875rem; text-align: center; padding: 0.45rem var(--gutter); }
.todo { background: var(--todo); color: #5c4a00; padding: 0 0.3em; border-radius: 3px; font-weight: 600; white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--navy); min-width: 0; }
.brand:hover { color: var(--navy); }
.brand img { width: 44px; height: 44px; flex: none; }
.brand span { font: 500 1.125rem/1.2 var(--brand); letter-spacing: 0.005em; }
.site-nav { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.975rem; font-weight: 500; padding: 0.35rem 0; border-bottom: 2px solid transparent; transition: border-color 0.15s ease, color 0.15s ease; }
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--navy); }

/* Buttons */
.btn { display: inline-block; font: 600 1rem/1 var(--sans); padding: 0.85rem 1.25rem; border-radius: 6px; text-decoration: none; border: 1.5px solid var(--navy); transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--navy); }
.btn-quiet:hover { background: var(--tint); color: var(--navy-deep); }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; max-width: 16ch; }
.hero .lede { margin-top: 1.25rem; font-size: clamp(1.075rem, 1rem + 0.35vw, 1.2rem); max-width: 34rem; }
.hero .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* The slip: a typeset example of a crew payment slip with 2% TDS */
.slip { margin: 0; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 4px; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(5, 65, 144, 0.35); }
.slip figcaption { padding: 1rem 1.25rem 0.75rem; border-bottom: 1px dashed var(--line); }
.slip figcaption strong { display: block; color: var(--ink); font-size: 1rem; }
.slip figcaption span { font-size: 0.875rem; color: var(--muted); }
.slip table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.975rem; }
.slip th, .slip td { padding: 0.6rem 1.25rem; text-align: left; font-weight: 400; }
.slip td { text-align: right; white-space: nowrap; color: var(--ink); }
.slip tr + tr th, .slip tr + tr td { border-top: 1px solid var(--tint); }
.slip .tds th, .slip .tds td { color: var(--navy); font-weight: 600; }
.slip .net th, .slip .net td { border-top: 1px solid var(--ink); font-weight: 700; color: var(--ink); }
.slip .note { padding: 0.9rem 1.25rem 1.1rem; background: var(--tint); font-size: 0.925rem; line-height: 1.55; border-radius: 0 0 4px 4px; }

/* Sections */
.section { padding-block: clamp(3.25rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem clamp(2rem, 6vw, 5rem); }
.section h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
.section .intro { max-width: 40rem; }
.section .intro p + p { margin-top: 1rem; }

/* About: registered details */
.facts { margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 6px; }
.facts div { padding: 1rem 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.facts dt { font-size: 0.85rem; color: var(--muted); }
.facts dd { margin: 0.2rem 0 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* Services: plain rows, not cards */
.services { list-style: none; margin: 2.25rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.services li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0.4rem clamp(2rem, 6vw, 5rem); padding-block: 1.4rem; border-bottom: 1px solid var(--line); }
.services h3 { font-size: 1.15rem; line-height: 1.35; font-weight: 600; }
.services h3 small { display: block; font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-top: 0.2rem; }

.fees { margin-top: 2.5rem; max-width: 40rem; margin-left: auto; }
.fees h3 { font-size: 1.05rem; font-weight: 600; }
.fees table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-variant-numeric: tabular-nums; }
.fees th, .fees td { text-align: left; font-weight: 400; padding: 0.65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fees td { text-align: right; color: var(--ink); font-weight: 600; padding-left: 1rem; }
.fees p { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }

/* Contact */
.contact-list { margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1.75rem 2.5rem; }
.contact-list dt { font-size: 0.85rem; color: var(--muted); }
.contact-list dd { margin: 0.25rem 0 0; font-size: 1.1rem; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.contact-list address { font-style: normal; font-size: 1rem; font-weight: 400; line-height: 1.55; }

/* Footer */
.site-footer { background: var(--ink); color: #c4cbd6; font-size: 0.925rem; padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom)); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer p + p { margin-top: 0.35rem; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-content: flex-start; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }

/* Policy pages */
.policy { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }
.policy .wrap { max-width: 46rem; }
.policy h1 { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.6rem); line-height: 1.12; letter-spacing: -0.02em; }
.policy .updated { margin-top: 0.6rem; color: var(--muted); font-size: 0.925rem; }
.policy h2 { font-size: 1.25rem; margin-top: 2.25rem; line-height: 1.3; }
.policy p, .policy ul { margin-top: 0.85rem; }
.policy ul { padding-left: 1.25rem; }
.policy li + li { margin-top: 0.4rem; }
.policy .back { display: inline-block; margin-bottom: 1.5rem; font-size: 0.95rem; }

@media (max-width: 52rem) {
  .hero .wrap, .section-head, .services li { grid-template-columns: minmax(0, 1fr); }
  .fees { margin-left: 0; }
}
@media (max-width: 30rem) {
  .brand span { font-size: 1rem; }
  .brand img { width: 38px; height: 38px; }
  .hero .actions .btn { flex: 1 1 auto; text-align: center; }
  .slip th, .slip td { padding-inline: 1rem; }
}

@media print {
  .draft-banner, .skip, .site-nav, .hero .actions { display: none; }
  .site-footer { background: none; color: var(--ink); }
  .site-footer a { color: var(--ink); }
}
