/* Pringle Advisory – coming soon page
   Base styles = phones & portrait tablets.
   Desktop / landscape layout is in the media query further down. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #141414;
  --ink-soft: #2a2a2a;
  --gold: #f7b502;
  --gold-hover: #e6a700;
  --sky-top: #fefefe;
  --sky-low: #fbf6f0;            /* matches the top of the photo */
  --sea: #34434e;
  --img-ratio: 0.2398;           /* photo height / width (401 / 1672) */
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  width: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-top) 25%, var(--sky-low) 70%) var(--sky-low);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; height: auto; }

p, h1 { margin: 0; }

/* ---------- Top section (phones) ---------- */

.intro {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  display: flex;
}

.intro-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding:
    max(2rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    2rem
    max(1.25rem, env(safe-area-inset-left));
}

.brand img { width: clamp(250px, 72vw, 640px); height: auto; }

.rule {
  display: block;
  width: 90px;
  height: 6px;
  margin: 1.5rem auto 1.75rem;
  border-radius: 999px;
  background: var(--gold);
}

.headline {
  font-weight: 300;
  font-size: clamp(1.85rem, 8.6vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
  max-width: 22ch;
  text-wrap: balance;
}

.highlight {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.12em;
  right: -0.18em;
  bottom: -0.24em;
  height: 0.3em;
  background: url("../img/brush-underline.svg") no-repeat center / 100% 100%;
}

.subhead {
  margin-top: 1.1rem;
  font-weight: 600;
  font-size: clamp(1.2rem, 5vw, 1.9rem);
  line-height: 1.25;
}

.lead {
  margin-top: 0.85rem;
  font-weight: 400;
  font-size: clamp(1rem, 4vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* ---------- Button ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.95em;
  margin-top: 1.75rem;
  min-height: 52px;
  padding: 0.95em 2.6em;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(0.95rem, 4vw, 1.2rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(185, 120, 0, 0.18);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-icon { width: 1.5em; height: 1.5em; flex: none; }

.cta:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(185, 120, 0, 0.26);
}

.cta:active { transform: translateY(0); }

.cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* ---------- Landscape / footer (phones) ---------- */

.landscape {
  --scene-w: 215vw;
  --scene-h: calc(var(--scene-w) * var(--img-ratio));
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  padding-top: calc(var(--scene-h) - 2.75rem);
  color: #fff;
  background: linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--scene-h) * 0.6),
    var(--sea) calc(var(--scene-h) * 0.6)
  );
}

.landscape::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--scene-h);
  background-image: url("../img/cape-town-sunset.jpg");
  background-image: image-set(
    url("../img/cape-town-sunset.webp") type("image/webp"),
    url("../img/cape-town-sunset.jpg") type("image/jpeg")
  );
  background-repeat: no-repeat;
  background-size: var(--scene-w) auto;
  background-position: 11% 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20%);
}

/* fade the water into the solid band behind the text */
.landscape::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--scene-h) * 0.72);
  background: linear-gradient(to bottom, rgba(52, 67, 78, 0) 0, var(--sea) calc(var(--scene-h) * 0.28));
  pointer-events: none;
}

.credits {
  position: relative;
  z-index: 1;
  width: 100%;
  padding:
    0.5rem
    max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.credits p {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.person {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  font-weight: 400;
}

.person strong {
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.legal {
  margin-top: 0.85rem !important;
  font-size: 0.66rem;
  line-height: 1.75;
  letter-spacing: 0.15em;
  opacity: 0.95;
}

.sep { display: none; margin: 0 1.4em; opacity: 0.85; }

/* ---------- Portrait tablets ---------- */

@media (min-width: 641px) {
  .landscape { --scene-w: 165vw; }
  .rule { width: 11vw; height: 0.75vw; margin: 3vw auto 3.5vw; }
  .headline { font-size: 6.4vw; max-width: none; }
  .subhead { margin-top: 2vw; font-size: 3.4vw; }
  .lead { margin-top: 1.6vw; font-size: 2.5vw; max-width: none; }
  .cta { margin-top: 3.5vw; font-size: 1.9vw; letter-spacing: 0.2em; }
  .credits p { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; }
  .sep { display: inline; }
  .person { font-size: 1.9vw; }
  .person strong { margin-bottom: 0; }
  .legal { font-size: 1.45vw; line-height: 1.5; }
}

/* ---------- Desktop / landscape screens ----------
   The photo is always shown at its full height (width-fitted), so the
   whole mountain range is visible on landing. The text block gets the
   remaining height and scales itself to fit, so it never runs into
   the mountains. */

@media (min-width: 641px) and (orientation: landscape), (min-width: 1101px) {
  :root {
    --photo-h: calc(100vw * var(--img-ratio));
    --sky-overlap: 4.2vw;          /* text may sit over the plain sky at the top of the photo */
  }

  .intro {
    flex: 0 0 auto;
    height: calc(100vh - var(--photo-h) + var(--sky-overlap));
    height: calc(100svh - var(--photo-h) + var(--sky-overlap));
    min-height: 380px;
    container-type: size;
  }

  .intro-inner {
    /* 1 design unit = 1px of the 1672px-wide mockup, scaled to fit */
    --u: min(calc(100cqw / 1672), calc(100cqh / 620), 1.15px);
    justify-content: center;
    padding: calc(40 * var(--u)) 1.5rem 0;
  }

  .brand img { width: calc(820 * var(--u)); }

  .rule {
    width: calc(174 * var(--u));
    height: calc(10 * var(--u));
    margin: calc(45 * var(--u)) auto calc(62 * var(--u));
  }

  .headline { font-size: calc(70 * var(--u)); max-width: none; }
  .subhead  { margin-top: calc(26 * var(--u)); font-size: calc(40 * var(--u)); }
  .lead     { margin-top: calc(24 * var(--u)); font-size: calc(30 * var(--u)); max-width: none; }

  .cta {
    margin-top: calc(42 * var(--u));
    min-height: 44px;
    font-size: calc(20 * var(--u));
    letter-spacing: 0.2em;
  }

  .landscape {
    margin-top: calc(-1 * var(--sky-overlap));
    height: var(--photo-h);
    min-height: 0;
    padding-top: 0;
    display: flex;
    align-items: flex-end;
    background: none;
  }

  .landscape::before {
    inset: 0;
    height: auto;
    background-size: 100% auto;
    background-position: 50% 100%;
  }

  .landscape::after {
    top: auto;
    height: 40%;
    background: linear-gradient(to top, rgba(28, 38, 46, 0.5), rgba(28, 38, 46, 0));
  }

  .credits { padding: 0 1.5rem 1.6vw; }
  .person  { font-size: 1.25vw; }
  .legal   { margin-top: 0.7vw !important; font-size: 0.95vw; }
  .sep     { display: inline; }
}

/* ---------- Utilities ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cta { transition: none; }
  .cta:hover { transform: none; }
}
