/* Avanti Mondo, Direction C "Monograph": static prototype (LOCAL ONLY).
   Targets: redo/LOCKED/AM_redo_C_monograph_{desktop,full,mobile}.png, sizes from _compose_redo.py C_stack.
   Vertical rhythm: the mock places text by BASELINE. Every text block below gets an explicit
   line-height, and its margin-top is (mock baseline gap) − (baseline offset inside its own line box)
   − (space below the previous block's baseline). Baseline offset = LH/2 + k·font-size, with
   k = (ascent − descent)/2 = 0.36377 (Inter, 1984/−494 per 2048) and 0.3185 (Cormorant, 924/−287 per 1000).
   The values are pre-computed px so the classes port 1:1 into Webflow (no calc()/custom props needed there). */

/* ---------- fonts (local variable TTFs) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --cream: #F8F7F2;
  --red: #C62E30;
  --navy: #1C4E89;
  --ink: #1A1A1A;
  --stone: #6B6B66;
  --rule: #D9D4C8;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.am {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-optical-sizing: auto;          /* Inter opsz follows font-size, like the mock renderer */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, p, address { margin: 0; font: inherit; }
address { font-style: normal; }
a { color: inherit; }
img, svg { display: block; }

/* =====================================================================
   DESKTOP ≥1200: 50/50 grid, stack bottom-anchored (last address baseline 96px above the fold)
   ===================================================================== */
.mono {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;                  /* fallback */
  min-height: 100svh;
}
.mono__type {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;          /* bottom-anchored stack */
  align-items: flex-start;            /* every item shrink-wraps (login underline = text width) */
  padding: 96px 48px 91.82px 96px;    /* bottom: 96 − 4.18 (address line box below its baseline) */
  min-width: 0;
}

/* 1. sunburst 52px → 40 */
.mono__mark { width: 52px; height: auto; aspect-ratio: 2314 / 1198; color: var(--red); flex: none; }

/* 2. wordmark 560px (placeholder raster; same box for the future SVG) → 38 to label baseline */
.am-wordmark { margin-top: 40px; width: 560px; max-width: 100%; }
.am-wordmark__img { width: 100%; height: auto; }

/* labels: Inter 500 11/16, 0.22em tracking, navy. Baseline at 12.00 in the box, 4.00 below. */
.am-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy);
  margin-left: 1px;                   /* optical: mock sets labels at x+1 */
}
.am-label--intro { margin-top: 26px; }        /* 38 − 12.00 */

/* 4. statement: Cormorant 500 31/39, 2 lines → 56 from label baseline to 1st baseline */
.am-statement {
  margin-top: 22.63px;                /* 56 − 29.37 − 4.00 */
  margin-left: -1px;                  /* optical: mock sets the statement at x−1 */
  font-family: var(--serif);
  font-weight: 500;
  font-size: 31px;
  line-height: 39px;
  color: var(--ink);
}

/* 5. Private login: Inter 500 14.5px ink, 1px rule underline 4px under the baseline → /private.
      line-height 18.55 puts the box bottom (= border) exactly at baseline + 4. Baseline at 14.55. */
.am-login {
  margin-top: 51.82px;                /* 76 − 14.55 − 9.63 (statement below-baseline) */
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 18.55px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.am-login:hover, .am-login:focus-visible { border-bottom-color: currentColor; }
.am-login:focus-visible, .am-email:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* 6. CONTACT: 52 from login baseline (login box ends 5px below its baseline) */
.am-label--contact { margin-top: 35px; }       /* 52 − 12.00 − 5 */

/* 7. email: Cormorant 500 17/22 navy → 30 from CONTACT baseline. Baseline at 16.41. */
.am-email {
  margin-top: 9.59px;                 /* 30 − 16.41 − 4.00 */
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 22px;
  color: var(--navy);
  text-decoration: none;
}
.am-email:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* 8. address: Inter 400 10.5/16 stone → 26 from email baseline. Baseline at 11.82. */
.am-addr {
  margin-top: 8.59px;                 /* 26 − 11.82 − 5.59 */
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10.5px;
  line-height: 16px;
  color: var(--stone);
}

/* photo: treatment baked into the JPG export (tools/make_assets.py), no CSS filters */
.mono__media { position: relative; overflow: hidden; min-width: 0; }
.mono__media picture { position: absolute; inset: 0; }
.mono__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53.3% 50%;         /* = mock crop (cx 1330, cy 690, zoom 1.4) at 720×900 */
}

/* footer band below the hero: hairline at +88 (96px inset), © baseline at +140, page ends at +200 */
.am-footer { padding: 88px 96px 0; }
.am-footer__copy {
  border-top: 1px solid var(--rule);
  padding: 38.63px 0 56.37px;         /* 140 − 89 − 12.37 ; 200 − 140 − 3.63 */
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--stone);
}

/* =====================================================================
   992–1199 (iPad landscape etc.): 55/45 split, 64px padding, fluid wordmark + statement
   ===================================================================== */
@media (max-width: 1199px) {
  .mono { grid-template-columns: 55fr 45fr; }
  .mono__type { padding: 64px 48px 59.82px 64px; }  /* bottom: 64 − 4.18 */
  .am-wordmark { width: clamp(380px, 38vw, 560px); }
  .am-statement { font-size: clamp(26px, 2.2vw, 31px); line-height: 1.258; }  /* 39/31 */
  .am-footer { padding-left: 64px; padding-right: 64px; }
}

/* Short desktop windows: stop bottom-anchoring, flow from the top so nothing collides */
@media (min-width: 992px) and (max-height: 759px) {
  .mono__type { justify-content: flex-start; padding-top: 64px; padding-bottom: 64px; }
}

/* =====================================================================
   ≤991 (tablet portrait + phones): stacked. Photo band on top, stack bottom-anchored,
   footer row (© only) at the bottom of the first screen.
   ===================================================================== */
@media (max-width: 991px) {
  .mono {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 38px);   /* footer row is 38px: hero + footer = one screen */
    min-height: calc(100svh - 38px);
  }
  .mono__media { order: -1; flex: none; height: 42vh; height: 42svh; }
  .mono__img { object-position: 72.7% 50%; }      /* = mobile mock crop (cx 1330, cy 720, zoom 1.5) */
  .mono__type {
    flex: 1 0 auto;
    padding: 48px 48px 23.82px;       /* last address baseline 66px above the screen bottom: 66 − 4.18 − 38 */
  }
  .am-wordmark { width: 420px; }
  .am-statement { font-size: 31px; line-height: 39px; }
  .am-footer { padding: 0 48px; }
  .am-footer__copy {
    border-top: 0;
    padding: 0 0 22px;                /* © baseline 26px from the bottom: 26 − 4.00 */
    font-size: 11px;
    line-height: 16px;                /* baseline at 12.00 → row height 38 */
  }
}

/* =====================================================================
   ≤479 (phones, 390 reference): mobile values from C_stack(mob=True)
   ===================================================================== */
@media (max-width: 479px) {
  .mono__media { height: 40vh; height: 40svh; }   /* 338px at 844 */
  .mono__type { padding: 40px 24px 24.14px; }     /* 66 − 3.86 − 38 */
  .mono__mark { width: 40px; }
  .am-wordmark { margin-top: 30px; width: 300px; }
  .am-label { font-size: 10px; }                  /* 10/16: baseline 11.64, 4.36 below */
  .am-label--intro { margin-top: 18.36px; }       /* 30 − 11.64 */
  .am-statement { margin-top: 15.31px; font-size: 23px; line-height: 30px; }  /* 42 − 22.33 − 4.36 */
  .am-login { margin-top: 25.78px; }              /* 48 − 14.55 − 7.67 */
  .am-label--contact { margin-top: 23.36px; }     /* 40 − 11.64 − 5 */
  .am-email { margin-top: 6.86px; font-size: 15px; line-height: 20px; }       /* 26 − 14.78 − 4.36 */
  .am-addr { margin-top: 5.64px; font-size: 10px; line-height: 15px; }        /* 22 − 11.14 − 5.22 */
  .am-footer { padding: 0 24px; }
}

/* ---------- v2: long-form body copy, Enquire + login row, footer link ---------- */
.am-body { max-width: 520px; font-size: 21px; line-height: 28px; }
.am-body p + p { margin-top: 14px; }
.am-links { display: flex; gap: 32px; margin-top: 44px; }
.am-links .am-login { margin-top: 0; }
.am-links + .am-addr { margin-top: 40px; }   /* Contact/email removed: address follows the links row */
.am-footer__addr { display: block; margin-bottom: 4px; }   /* address line above the © line */
.am-nw { white-space: nowrap; }   /* address wraps only at the · separators */
.am-footer__link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
.am-footer__link:hover { border-bottom-color: currentColor; }
@media (max-width: 1199px) { .am-body { font-size: 19px; line-height: 26px; } }
@media (max-width: 991px) { .am-body { font-size: 20px; line-height: 27px; } }
@media (max-width: 479px) {
  .am-body { font-size: 17px; line-height: 23px; }
  .am-body p + p { margin-top: 10px; }
  .am-links { margin-top: 26px; gap: 28px; }
  .am-links + .am-addr { margin-top: 28px; }
}
