/* ==========================================================================
   AHG International — site styles
   Type, colour and spacing values mirror the approved design
   (design/AHG International.dc.html). Halftone bands are generated by
   tools/patterns.py into assets/.
   ========================================================================== */

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/spectral-300-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spectral-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/archivo-latin-var.woff2') format('woff2');
}

:root {
  /* Palette */
  --bg: #faf9f6;
  --desk: #edeae2;  /* what shows around the 1440px sheet on wide screens */
  --ink: #1c1c19;
  --muted: #6b6a63;
  --rule: #e4e1d8;
  --accent: #233830;
  --accent-deep: #0f1a15;
  --on-accent: #d8ded9;
  --on-accent-muted: #8fa398;

  /* Type */
  --serif: 'Spectral', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Measure */
  --page: 1440px;   /* the whole page is capped at the width the bands were drawn for */
  --shell: 1060px;
  --gutter: 48px;

  /* Bands */
  --band-h: 120px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html { background: var(--desk); }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

::selection { background: #23383022; }

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

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  color: var(--on-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */

.page {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  background: var(--bg);
}

/* Wide screens: the page sits as a sheet on the desk */
@media (min-width: 1536px) {
  .page {
    margin: 48px auto;
    min-height: calc(100vh - 96px);
    min-height: calc(100svh - 96px);
    box-shadow: 0 0 0 1px var(--rule), 0 24px 60px -30px rgba(28, 28, 25, 0.18);
  }
}

.site-main { flex: 1; }

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

.shell--tail { padding-bottom: 120px; }

.split {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

.split > .section-label { padding-top: 8px; }

/* --------------------------------------------------------------------------
   Halftone bands — full-bleed breaks between sections. Each is a crop of the
   same two photographs (a summit, then clouds, then the mountain's base),
   re-screened as fine ink dots. `background-size: cover` plus the SVG's own
   preserveAspectRatio anchor decide what survives when the box crops.
   -------------------------------------------------------------------------- */

.band {
  height: var(--band-h);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.band--peak {
  /* 380px at the 1440px page width, scaling with the page below that (cqw = page width) */
  height: clamp(180px, 26.4vw, 380px);
  height: clamp(180px, 26.4cqw, 380px);
  background-image: url('/assets/band-peak.svg');
  background-position: right top;
}

/* clouds-1 (dark bank) is generated too — swap here */
.band--clouds { background-image: url('/assets/band-clouds-2.svg'); }
.band--clouds-low { background-image: url('/assets/band-clouds-3.svg'); }

.band--base {
  height: 160px;
  background-image: url('/assets/band-base.svg');
  background-position: center bottom;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  flex: none;
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.brand__name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a { color: var(--muted); }

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 140px var(--gutter) 120px;
}

.eyebrow,
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.eyebrow { margin-bottom: 36px; }

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  max-width: 15em;
  text-wrap: pretty;
}

.hero__lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 34em;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.5;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.prose {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 40em;
  margin: 0;
}

/* Businesses — a plain list of links, one row per holding */

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.links__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.links__item:hover {
  color: var(--accent);
  text-decoration: none;
}

.links__name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
}

.links__url {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.links__item:hover .links__url { color: var(--accent); }

/* Contact */

.contact__email {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 40px);
  color: var(--ink);
}

.contact__email:hover {
  color: var(--accent);
  text-decoration: none;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 300px));
  gap: 48px;
  margin-top: 56px;
}

.detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.detail__value {
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Footer — sits directly under the base band, which dissolves into it
   -------------------------------------------------------------------------- */

.site-footer { background: var(--accent); }

.shell--footer {
  padding: 40px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__mark {
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--on-accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--on-accent);
  line-height: 1;
}

.footer__name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-accent);
}

.footer__nav {
  display: flex;
  gap: 28px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer__nav a { color: var(--on-accent-muted); }

.footer__nav a:hover {
  color: var(--on-accent);
  text-decoration: none;
}

.footer__legal {
  font-size: 12px;
  color: var(--on-accent-muted);
  margin: 0;
}

.site-footer :focus-visible { outline-color: var(--on-accent); }

/* --------------------------------------------------------------------------
   Legal pages (privacy.html, terms.html)
   -------------------------------------------------------------------------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px var(--gutter) 140px;
}

.legal__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 24px 0 12px;
}

.legal__meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 56px;
}

.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  margin: 48px 0 12px;
}

.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.75;
  color: #3a3a35;
  margin: 0 0 14px;
}

.legal ul {
  padding-left: 1.2em;
  margin: 0 0 14px;
}

.legal a { text-decoration: underline; text-underline-offset: 3px; }

.legal .back {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.legal .back:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Responsive — desktop composition above 900px is untouched
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  :root {
    --gutter: 32px;
    --band-h: 96px;
  }

  .hero { padding-top: 96px; padding-bottom: 80px; }
  .shell { padding-top: 72px; padding-bottom: 72px; }
  .shell--tail { padding-bottom: 88px; }

  .band--base { height: 128px; }

  .split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .split > .section-label { padding-top: 0; }

}

@media (max-width: 700px) {
  .details {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 40px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 24px;
    --band-h: 80px;
  }

  .site-header { padding-top: 22px; padding-bottom: 22px; }
  .hero { padding-top: 72px; padding-bottom: 64px; }
  .shell { padding-top: 56px; padding-bottom: 56px; }
  .shell--tail { padding-bottom: 72px; }
  .shell--footer { padding-top: 32px; padding-bottom: 32px; }

  .band--peak { height: 160px; }
  .band--base { height: 112px; }

  .brand__name { font-size: 12px; }
  .site-nav { gap: 24px; }

  .eyebrow { margin-bottom: 28px; }
  .statement { font-size: 22px; }
  .legal { padding-top: 64px; padding-bottom: 96px; }
}
