/* =========================================================
   IO, Invitation Only
   One stylesheet for the whole site. Colours and type come
   from the IO design system (the brochure advert, page 11).
   ========================================================= */

/* Layout: left-aligned editorial page, 1320px max, square corners,
   one diagonal cut (lower-left) borrowed from the logo. */
:root {
  /* Colour */
  --midnight: #070e26;      /* ground */
  --midnight-deep: #0f193a; /* far end of the ground glow */
  --amber: #ffb703;         /* brand, primary button, one highlight */
  --amber-hover: #ffc53a;
  --champagne: #c9ae7a;     /* fine lines and icons only */
  --white: #ffffff;
  --mist: #9599a6;          /* supporting text on midnight */
  --mist-subtle: #848a9c;   /* captions on midnight */
  --ivory: #f5f4f0;         /* light band */
  --ink-muted-ivory: #4a4f60;
  --ink-subtle-ivory: #5c6172;
  --hairline: rgba(201, 174, 122, 0.25);
  --hairline-ivory: rgba(7, 14, 38, 0.12);

  /* Type */
  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --display-xl: clamp(2.75rem, 1.6rem + 4.2vw, 4.875rem);
  --display-l: clamp(2.125rem, 1.5rem + 2.4vw, 3.75rem);
  --title: clamp(1.625rem, 1.4rem + 0.6vw, 2rem);
  --lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);

  /* Space */
  --gutter: 48px;
  --section: 160px;
  --page-max: 1320px;

  /* The diagonal cut */
  --cut-s: 10px;
  --cut-m: 28px;
  --cut-l: 64px;

  color-scheme: dark;
}

@media (max-width: 900px) {
  :root { --gutter: 24px; --section: 112px; --cut-l: 44px; }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; --section: 88px; --cut-l: 36px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
a { color: var(--amber); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.ivory a:focus-visible { outline-color: var(--midnight); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--midnight);
  padding: 12px 18px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: var(--section); }

/* ---------- Shared pieces ---------- */
.cut-s { clip-path: polygon(var(--cut-s) 100%, 0 calc(100% - var(--cut-s)), 0 0, 100% 0, 100% 100%); }
.cut-m { clip-path: polygon(var(--cut-m) 100%, 0 calc(100% - var(--cut-m)), 0 0, 100% 0, 100% 100%); }
.cut-l { clip-path: polygon(var(--cut-l) 100%, 0 calc(100% - var(--cut-l)), 0 0, 100% 0, 100% 100%); }

.photo { overflow: hidden; background: var(--midnight-deep); }
.photo picture { display: block; height: 100%; }
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.68) contrast(1.04) brightness(0.9);
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font: 600 0.875rem/1 var(--font); letter-spacing: 0.04em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--amber); color: var(--midnight); }
.btn-primary:hover { background: var(--amber-hover); color: var(--midnight); }
.btn-secondary { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px var(--champagne); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--white); color: var(--white); }
.btn-dark { background: var(--midnight); color: var(--white); }
.btn-dark:hover { background: var(--midnight-deep); color: var(--white); }
.btn-dark .arrow { color: var(--amber); }

.text-link {
  display: inline-flex; gap: 8px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--amber); text-decoration: none;
  padding-bottom: 6px;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size 0.3s ease;
}
.text-link:hover { color: var(--amber-hover); }

.eyebrow {
  font-size: 0.75rem; line-height: 1.3; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--champagne);
}
.lead { font-size: var(--lead); line-height: 1.6; font-weight: 300; color: var(--mist); }
.body-muted { font-size: 1.125rem; line-height: 1.7; font-weight: 300; color: var(--mist); }
.h-display { font-size: var(--display-l); line-height: 1.06; letter-spacing: -0.02em; }

/* The logo descriptor, exactly as in the advert */
.invitation { display: grid; gap: 24px; justify-items: start; }
.invitation::before { content: ""; width: 64px; height: 2px; background: var(--champagne); }
.invitation span { font-size: 0.9375rem; letter-spacing: 0.42em; font-weight: 400; text-transform: uppercase; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-solid { background: rgba(7, 14, 38, 0.96); box-shadow: 0 1px 0 var(--hairline); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 88px;
}
.brand { display: block; line-height: 0; }
.brand img { height: 30px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--white); text-decoration: none;
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.02em;
  padding-block: 8px;
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 0 2px no-repeat;
  transition: background-size 0.3s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background-size: 100% 2px; }
.nav-cta { min-height: 44px; padding: 0 22px; }

.menu-toggle {
  display: none; align-items: center; gap: 12px;
  min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--white); cursor: pointer;
  font: 600 0.875rem/1 var(--font); letter-spacing: 0.04em;
}
.menu-toggle .bars { position: relative; width: 20px; height: 2px; background: var(--amber); }
.menu-toggle .bars::after { content: ""; position: absolute; left: 0; top: 6px; width: 20px; height: 2px; background: var(--amber); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--midnight);
  padding-top: env(safe-area-inset-top, 0px);
  display: flex; flex-direction: column;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu .wrap.menu-top { display: flex; justify-content: space-between; align-items: center; min-height: 88px; }
.mobile-menu ul { list-style: none; margin: 0; padding: 32px 0 0; display: grid; gap: 4px; }
.mobile-menu ul a {
  display: block; padding: 14px 0;
  color: var(--white); text-decoration: none;
  font-size: 2rem; font-weight: 700; letter-spacing: -0.015em;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu .btn { margin-top: 40px; }
body.menu-open { overflow: hidden; }

@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- 1. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--midnight) 55%, var(--midnight-deep) 100%);
  padding-top: calc(88px + env(safe-area-inset-top, 0px));
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px; align-items: end;
  padding-top: 72px;
}
.hero-copy { padding-bottom: 96px; }
.hero h1 {
  margin-top: 40px;
  font-size: var(--display-xl); line-height: 1.02; letter-spacing: -0.025em;
}
.hero h1 .accent { color: var(--amber); }
.hero .lead { margin-top: 32px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }
.hero-photo { position: relative; margin: 0 calc(var(--gutter) * -1) 0 0; }
.hero-photo .photo { aspect-ratio: 4 / 5; }
.hero-photo figcaption {
  position: absolute; right: 20px; bottom: 16px;
  font-size: 0.75rem; color: var(--white); opacity: 0.8;
}

.corner-tab { position: absolute; right: 0; top: calc(104px + env(safe-area-inset-top, 0px)); z-index: 2; }
.corner-tab p {
  background: var(--amber); color: var(--midnight);
  padding: 22px max(36px, env(safe-area-inset-right, 0px)) 22px 46px;
  font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.22em; font-weight: 800;
}
.corner-tab::after { content: ""; display: block; width: 26px; height: 26px; margin: 14px 0 0 auto; background: var(--amber); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 48px; }
  .hero-copy { padding-bottom: 0; }
  .corner-tab { top: auto; bottom: 0; }
}
@media (max-width: 600px) {
  .corner-tab { display: none; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- 2. Commercial opportunity ---------- */
.uses-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 96px; }
.uses-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px;
  border-top: 1px solid var(--hairline);
}
.uses-list li {
  padding-block: 28px; border-bottom: 1px solid var(--hairline);
  font-size: 1.25rem; line-height: 1.4; font-weight: 500;
}
.uses-grid .body-muted { margin-top: 40px; max-width: 36em; }

@media (max-width: 900px) { .uses-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
@media (max-width: 600px) { .uses-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 3. Our experiences ---------- */
.formats { padding-top: 0; }
.formats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }
.formats-grid > :nth-child(2) { margin-top: 160px; }
.format-card .photo { aspect-ratio: 4 / 3; }
.format-card .eyebrow { margin-top: 36px; }
.format-card h3 { margin: 12px 0 14px; font-size: var(--title); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.format-card h3 a { color: var(--white); text-decoration: none; }
.format-card .body-muted { font-size: 1.0625rem; max-width: 32em; margin-bottom: 28px; }

@media (prefers-reduced-motion: no-preference) {
  .format-card .photo img { transition: transform 0.6s ease; }
  .format-card:hover .photo img { transform: scale(1.03); }
}
@media (max-width: 900px) {
  .formats-grid { grid-template-columns: minmax(0, 1fr); gap: 72px; }
  .formats-grid > :nth-child(2) { margin-top: 0; }
}

/* ---------- 4. Community (Ivory band) ---------- */
.ivory { background: var(--ivory); color: var(--midnight); }
.community-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 96px; align-items: start; }
.community-grid .marker { width: 26px; height: 26px; background: var(--amber); }
.community-grid h2 { margin: 32px 0 24px; }
.community-grid .intro { max-width: 30em; font-size: 1.125rem; line-height: 1.7; color: var(--ink-muted-ivory); }

.logo-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hairline-ivory); border-left: 1px solid var(--hairline-ivory);
}
.logo-grid li {
  aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 18%;
  border-right: 1px solid var(--hairline-ivory); border-bottom: 1px solid var(--hairline-ivory);
  font-size: 0.75rem; color: var(--ink-subtle-ivory); text-align: center;
}
.logo-grid img { max-height: 100%; width: auto; filter: grayscale(1); opacity: 0.85; }
.logo-note { margin-top: 20px; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-subtle-ivory); }

@media (max-width: 900px) {
  .community-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .logo-grid li { padding: 12%; font-size: 0.625rem; } }

/* ---------- 5. The IO philosophy ---------- */
.philosophy { background: linear-gradient(200deg, var(--midnight-deep) 0%, var(--midnight) 60%); }
.philosophy h2 { max-width: 15em; }
.philosophy .body-muted { margin: 32px 0 96px; max-width: 38em; }
.io-split { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 56px; align-items: center; }
.io-side { display: flex; gap: 36px; align-items: center; }
.io-side svg { height: 150px; width: auto; flex: none; overflow: visible; }
.io-side .eyebrow { margin-bottom: 14px; }
.io-side .out .eyebrow, .io-side.out .eyebrow { color: var(--amber); }
.io-side p.words { font-size: 1.25rem; line-height: 1.55; font-weight: 500; }
.io-divider { width: 72px; height: 1px; background: var(--amber); transform: rotate(-45deg); }

@media (max-width: 900px) {
  .philosophy .body-muted { margin-bottom: 64px; }
  .io-split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .io-divider { transform: rotate(90deg); margin-left: 24px; }
}
@media (max-width: 600px) { .io-side svg { height: 112px; } .io-side { gap: 28px; } }

/* ---------- 6. Final call to action ---------- */
.closing {
  background: var(--amber); color: var(--midnight);
  clip-path: polygon(96px 0, 100% 0, 100% 100%, 0 100%, 0 96px);
  padding-block: 128px;
}
.closing .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; flex-wrap: wrap; }
.closing p { margin-top: 28px; max-width: 34em; font-size: 1.125rem; line-height: 1.7; font-weight: 500; }
.closing a:focus-visible { outline-color: var(--midnight); }
@media (max-width: 600px) {
  .closing { clip-path: polygon(48px 0, 100% 0, 100% 100%, 0 100%, 0 48px); padding-block: 96px; }
  .closing .btn { width: 100%; justify-content: center; }
}

/* ---------- Footer ---------- */
.site-footer { padding-top: 96px; padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.footer-brand img { height: 64px; width: auto; }
.footer-brand .invitation { margin-top: 20px; gap: 20px; }
.footer-brand .invitation span { font-size: 0.8125rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { color: var(--white); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.footer-nav a:hover { color: var(--amber); }
.footer-meta {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font-size: 0.8125rem; color: var(--mist-subtle);
}
@media (max-width: 900px) { .footer-main { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Motion: one settling moment on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero-actions, .corner-tab { animation: settle 0.7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .lead { animation-delay: 0.08s; }
  .hero-actions { animation-delay: 0.16s; }
  .corner-tab { animation-name: slide-in; animation-delay: 0.2s; }
  @keyframes settle { from { transform: translateY(14px); } to { transform: none; } }
  @keyframes slide-in { from { transform: translateX(24px); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
