/* Alan & Jam Trading. Fonts are self-hosted (GDPR): Newsreader, IBM Plex Sans, IBM Plex Mono, all OFL. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colours come from the client logo: royal blue wordmark, gold monogram */
  --paper: #f6f5f1;
  --paper-2: #ecebe4;
  --card: #fdfcfa;
  --ink: #14254a;           /* navy for dark sections */
  --ink-2: #1c3160;
  --text: #1a2235;
  --muted: #566074;
  --line: #dad7ce;
  --line-dark: #2f4573;
  --accent: #2a4888;        /* logo blue, text-safe on paper */
  --accent-hover: #203a6f;
  --gold: #b08a24;          /* logo gold for rules and graphics on paper */
  --accent-bright: #e2c565; /* gold on navy */
  --on-dark: #eceae2;
  --on-dark-muted: #aab3c6;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 450; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--on-dark); text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Type */

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.section-dark .eyebrow::before { background: currentColor; }

h1, h2, h3 { font-family: var(--serif); letter-spacing: -.012em; }

h1 {
  font-size: clamp(2.7rem, 6.2vw, 5.4rem);
  line-height: 1.0;
  font-weight: 420;
  max-width: 11ch;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.06;
  text-wrap: balance;
}
h3 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.15; }

.lead { font-size: clamp(1.06rem, 1.5vw, 1.22rem); line-height: 1.55; color: var(--muted); max-width: 34em; }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 2px;
  font-family: var(--sans); font-size: 15.5px; font-weight: 550; letter-spacing: .005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.button-accent { background: var(--accent); color: #fff; }
.button-accent:hover { background: var(--accent-hover); }
.button-dark { background: var(--ink); color: var(--on-dark); min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.button-dark:hover { background: var(--ink-2); }
.button-line { border-color: var(--text); color: var(--text); }
.button-line:hover { background: var(--text); color: var(--paper); }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 241, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 86px; }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { width: auto; height: 64px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.button) { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--text); }
.nav a:not(.button):hover { color: var(--accent); }

/* Hero */

.hero { padding: clamp(48px, 7vw, 88px) 0 0; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(24px, 4vw, 56px);
}
.hero-text h1 { margin-bottom: 28px; }
.hero-text .lead { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-map { position: relative; margin: 0 calc(var(--gutter) * -1) 0 0; }
.hero-map img {
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
}
.map-label {
  position: absolute; left: 28.6%; top: 44.6%;
  transform: translate(-50%, -38px);
  padding: 3px 8px;
  background: var(--ink); color: var(--on-dark);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
}
.map-label::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px;
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink);
}

.register {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--gold);
}
.register > div { padding: 18px 20px 22px 0; border-right: 1px solid var(--line); }
.register > div + div { padding-left: 20px; }
.register > div:last-child { border-right: 0; }
.register dt {
  margin-bottom: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.register dd { font-size: 15.5px; font-weight: 500; line-height: 1.4; }

/* Sections */

.section { padding: var(--section) 0; }
.section-tint { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark .eyebrow { color: var(--accent-bright); }
.section-dark p { color: var(--on-dark-muted); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 6vw, 96px); align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head > p { margin: 0; max-width: 34em; color: var(--muted); }
.section-dark .section-head > p { color: var(--on-dark-muted); }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(40px, 7vw, 112px); align-items: start;
}
.split h2 { margin-bottom: 24px; }
.split > div > p { max-width: 34em; }

/* Services */

.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 5vw, 80px);
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}
.service:last-child { padding-bottom: 0; }
.service-head { align-self: start; position: sticky; top: 118px; }
.service-no {
  display: block; margin-bottom: 14px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--accent);
}
.service-head h3 { margin-bottom: 18px; font-size: clamp(1.7rem, 2.7vw, 2.25rem); }
.service-head p { margin: 0; color: var(--muted); }

/* The lead service: head in two columns, phases across the full width */
.service-wide { grid-template-columns: 1fr; }
.service-wide .service-head {
  position: static; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(32px, 5vw, 80px); align-items: end;
}
.service-wide .service-head h3 { margin: 0; }
.service-wide .service-head p { grid-column: 2; grid-row: 1 / span 2; max-width: 40em; }

.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.phase { padding: 22px 22px 24px; background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--gold); }
.phase h4 {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 16px;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
}
.phase h4 span { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); }
.phase li { position: relative; padding: 9px 0 9px 0; font-size: 15px; line-height: 1.45; border-top: 1px solid var(--line); }
.phase li:first-child { border-top: 0; padding-top: 0; }

.service-body { display: grid; gap: 28px; }
.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.ticks li {
  position: relative; padding: 13px 0 13px 26px;
  border-top: 1px solid var(--line); line-height: 1.45;
}
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 21px;
  width: 10px; height: 5px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

.checks { padding: 22px 24px; background: var(--ink); color: var(--on-dark); }
.checks p { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-bright); }
.checks ul { display: flex; flex-wrap: wrap; gap: 8px; }
.checks li { padding: 6px 12px; border: 1px solid var(--line-dark); font-size: 15px; }

.note { margin: 0; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--muted); font-size: 15.5px; }

/* Photos */

.photo {
  position: relative; margin: 0; overflow: hidden;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--ink-2), var(--ink));
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  position: absolute; left: 0; bottom: 0;
  padding: 6px 12px; background: var(--ink); color: var(--on-dark);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
}
/* Picture not generated yet: the gradient shows until the file exists */
.photo-bg { background-size: cover; background-position: center; }
.split .photo { margin-top: 36px; }

/* Process */

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 24px 0 0; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--line-dark); }
.steps li:last-child::before { right: auto; width: 40px; }
.step-no {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 22px;
  border: 1px solid var(--accent-bright); border-radius: 50%;
  background: var(--ink);
  font-family: var(--mono); font-size: 12.5px; color: var(--accent-bright);
}
.steps h3 { margin-bottom: 10px; font-size: 1.45rem; color: var(--on-dark); }
.steps p { margin: 0; font-size: 15.5px; line-height: 1.55; }

/* Partners */

.partners { counter-reset: p; border-top: 1px solid var(--gold); }
.partners li {
  counter-increment: p;
  display: grid; grid-template-columns: 44px 1fr; align-items: baseline;
  padding: 15px 0; border-bottom: 1px solid var(--line);
  font-size: 17px; line-height: 1.4;
}
.partners li::before { content: counter(p, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* About */

.details { padding: clamp(24px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); }
.details h3 { margin-bottom: 20px; font-size: 1.4rem; }
.details dl > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.details dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.details dd { font-size: 15.5px; line-height: 1.45; }

/* Contact */

.brief { margin-top: 28px; border-top: 1px solid var(--line-dark); }
.brief > div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.brief dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-bright); padding-top: 3px; }
.brief dd { color: var(--on-dark); font-size: 16px; }

.contact-card { padding: clamp(28px, 3.5vw, 44px); background: var(--ink-2); border: 1px solid var(--line-dark); }
.contact-label { margin: 0 0 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.contact-mail {
  display: block; margin-bottom: 22px;
  font-family: var(--serif); font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.2;
  color: var(--on-dark); text-decoration: none; overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--accent-bright); }
.contact-card .button { margin-bottom: 36px; }
.contact-card .button-accent { background: var(--accent-bright); color: var(--ink); }
.contact-card .button-accent:hover { background: #ecd385; }
.contact-card address { font-style: normal; color: var(--on-dark); line-height: 1.55; }

/* Footer */

.site-footer { padding: 48px 0 40px; background: #0e1b38; color: var(--on-dark-muted); }
.footer-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding-bottom: 28px; margin-bottom: 24px; border-bottom: 1px solid var(--line-dark);
}
.footer-logo { width: auto; height: 58px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-footer nav a { font-size: 14.5px; text-decoration: none; color: var(--on-dark); }
.site-footer nav a:hover { color: var(--accent-bright); }
.legal { margin: 0 0 6px; max-width: 60em; font-size: 13.5px; line-height: 1.55; }

/* Privacy page */

.doc { padding: clamp(48px, 7vw, 96px) 0 var(--section); }
.doc .wrap { max-width: 820px; }
.doc h1 { max-width: none; margin-bottom: 16px; font-size: clamp(2.4rem, 5vw, 3.6rem); }
.doc .updated { margin-bottom: 48px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc h2 { margin: 48px 0 14px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.doc ul { margin: 0 0 1em; }
.doc li { position: relative; padding: 4px 0 4px 20px; }
.doc li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 2px; background: var(--accent); }
.doc a { color: var(--accent); }

/* Responsive */

@media (max-width: 1080px) {
  .phases { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 44px; }
  .steps li:nth-child(3)::before { right: auto; width: 40px; }
}

@media (max-width: 900px) {
  .nav a:not(.button) { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-map { margin: 0 calc(var(--gutter) * -1); max-width: none; }
  .register { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .register > div:nth-child(2) { border-right: 0; }
  .register > div:nth-child(3) { padding-left: 0; }
  .register > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-head, .split, .service { grid-template-columns: 1fr; }
  .service-head { position: static; }
  .service-wide .service-head { display: block; }
  .service-wide .service-head h3 { margin-bottom: 18px; }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .site-header .wrap { height: 70px; }
  .brand-logo { height: 50px; }
  .button-dark { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
  .register { grid-template-columns: 1fr; }
  .register > div, .register > div + div { padding: 14px 0; border-right: 0; }
  .register > div + div { border-top: 1px solid var(--line); }
  .ticks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; padding: 0 0 28px; }
  .steps li::before, .steps li:nth-child(3)::before, .steps li:last-child::before { left: 19px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps li:last-child::before { bottom: auto; height: 40px; }
  .steps .step-no { grid-row: span 2; margin: 0; }
  .details dl > div, .brief > div { grid-template-columns: 1fr; gap: 4px; }
}
