/* co-thinking.io — "04 / Original Vision — Think, together."
   Implemented from Figma frames 446:59 (desktop, 1440×900) and 446:72 (mobile, 390×844).
   Desktop sizes scale with the viewport against a 1440px artboard; mobile against 390px. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #263d4a;
  --muted: #385b6c;
  --sky-base: #c0d6e1;
  --sky: linear-gradient(90deg, #98bbce 0%, #bed5de 49%, #e5e9e3 100%);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  background: var(--sky-base);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--sky-base);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p, h1 { margin: 0; }

/* ---------- Sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--sky);
  container-type: size;
  pointer-events: none;
}

/* The cloud stage keeps the artboard's proportions and covers the viewport,
   like background-size: cover. */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.stage--desktop {
  aspect-ratio: 1440 / 900;
  width: max(100vw, 160vh);
  width: max(100cqw, 160cqh);
}
.stage--mobile {
  display: none;
  aspect-ratio: 390 / 844;
  width: max(100vw, 46.2085vh);
  width: max(100cqw, 46.2085cqh);
}

.cloud {
  position: absolute;
  height: auto;
  max-width: none;
  user-select: none;
}

/* Portrait screens use the mobile art-direction crop. */
@media (max-aspect-ratio: 3/4) {
  .stage--desktop { display: none; }
  .stage--mobile { display: block; }
}

/* ---------- Layout (desktop, 1440 artboard) ---------- */

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding:
    calc(clamp(24px, 3.3333vw, 48px) + env(safe-area-inset-top))
    calc(clamp(24px, 5.4861vw, 79px) + env(safe-area-inset-right))
    calc(clamp(28px, 4.125vw, 59px) + env(safe-area-inset-bottom))
    calc(clamp(24px, 5.7639vw, 83px) + env(safe-area-inset-left));
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.6389vw, 38px);
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 6px;
  border-radius: 2px;
}

.eyebrow,
.colophon {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { letter-spacing: 0.07em; text-align: right; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* The composition sits slightly above the optical centre in the design. */
  padding-bottom: clamp(32px, 3.6111vw, 52px);
}

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9.3056vw, 134px);
  line-height: 1.05;
  letter-spacing: -0.017em;
  color: var(--ink);
}

.lede {
  margin-top: clamp(24px, 3.4722vw, 50px);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(16px, 1.3889vw, 20px);
  line-height: 1.05;
  letter-spacing: -0.002em;
  color: var(--muted);
}

.colophon {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  letter-spacing: 0.06em;
  padding-inline: clamp(0px, 0.2778vw, 4px);
}

.m-only { display: none; }

/* ---------- Mobile (390 artboard) ---------- */

@media (max-width: 640px) {
  .page {
    padding:
      calc(31px + env(safe-area-inset-top))
      calc(25px + env(safe-area-inset-right))
      calc(50px + env(safe-area-inset-bottom))
      calc(26px + env(safe-area-inset-left));
  }

  .wordmark { font-size: clamp(26px, 7.9487vw, 36px); }

  .eyebrow { font-size: 9px; letter-spacing: 0.04em; }

  .hero { padding-bottom: 54px; }

  .headline {
    font-size: clamp(56px, 20vw, 96px);
    letter-spacing: -0.0125em;
  }

  .lede {
    margin-top: 32px;
    font-size: 15px;
    letter-spacing: 0;
  }

  .colophon {
    font-size: 10px;
    letter-spacing: 0.04em;
    padding-inline: 0;
  }

  .d-only { display: none; }
  .m-only { display: inline; }
}

/* Portrait tablets: give the headline more presence on the tall canvas. */
@media (min-width: 641px) and (max-aspect-ratio: 3/4) {
  .headline { font-size: clamp(56px, 12vw, 134px); }
  .lede { font-size: clamp(16px, 2.2vw, 20px); }
}

/* Very short landscape screens: let the page scroll instead of overlapping. */
@media (max-height: 520px) and (min-width: 641px) {
  .hero { padding-block: 32px; }
}
