/* ==========================================================================
   Identity — base: fonts, reset, typography scale, buttons, placeholders
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../font/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "iBrand";
  src: url("../font/Ibrand.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- reset --------------------------------------------------------------- */

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

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.08px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;      /* Inter's opsz axis — matches the Figma render */
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

/* ---- layout -------------------------------------------------------------- */

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  position: relative;
  z-index: 1;
  padding-block: 120px;
}

.section--viewport {
  min-height: calc(100vh - var(--pf-nav-h, 0px));
  display: grid;
  align-content: center;
}

/* ---- type ---------------------------------------------------------------- */

.t-h1 {
  font-size: var(--t-h1);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.t-h2 {
  font-size: var(--t-h2);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.t-h3 {
  font-size: var(--t-h3);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.08px;
}

.t-sub {
  font-size: var(--t-sub);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.08px;
}

.t-body-lg {
  font-size: var(--t-body-lg);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.08px;
}

.t-body {
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.08px;
}

.t-body-sm {
  font-size: var(--t-body-sm);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

.t-dim { color: var(--fg-body); }

/* ---- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding-inline: 28px;
  border-radius: var(--r-pill);
  font-size: var(--t-body-sm);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.08px;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn:active { transform: translateY(1px); }

.btn--solid {
  background: var(--fg);
  color: var(--bg);
}

.btn--solid:hover { background: rgba(255, 255, 255, 0.86); }

.btn--outline {
  border: 1px solid var(--fg);
  color: var(--fg);
}

.btn--outline:hover { background: rgba(255, 255, 255, 0.12); }

.btn--nav {
  height: 44px;
  padding-inline: 24px;
  font-size: var(--t-body);
}

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

/* ---- badge --------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 30px;
  padding-inline: 18px;
  border-radius: var(--r-pill);
  background: var(--grad-3);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.08px;
  white-space: nowrap;
}

/* ---- image placeholders -------------------------------------------------- */
/*  Reproduces the “Photo Placeholder” blocks used across the v2 comps:
    a filled panel, both corner-to-corner diagonals, and a centred pill label. */

.ph {
  position: relative;
  overflow: hidden;
  background: var(--ph-fill, var(--bg-2));
  display: grid;
  place-items: center;
}

.ph::before,
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ph::before {
  background-image: linear-gradient(
    to bottom right,
    transparent calc(50% - 0.7px),
    var(--ph-line, #fff) calc(50% - 0.7px),
    var(--ph-line, #fff) calc(50% + 0.7px),
    transparent calc(50% + 0.7px)
  );
}

.ph::after {
  background-image: linear-gradient(
    to top right,
    transparent calc(50% - 0.7px),
    var(--ph-line, #fff) calc(50% - 0.7px),
    var(--ph-line, #fff) calc(50% + 0.7px),
    transparent calc(50% + 0.7px)
  );
}

.ph__label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 74px;
  padding-inline: 32px;
  border: 1px solid var(--ph-line, #fff);
  border-radius: var(--r-md);
  background: var(--ph-label-bg, #29125c);
  color: var(--ph-label-fg, var(--fg));
  font-size: var(--t-sub);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.08px;
}

/* ---- film grain ---------------------------------------------------------- */

/* Two passes:
   .grain       fine white/black speckle, blended normally — the only kind that
                stays visible on the near-black surfaces
   .grain--soft grey noise on `overlay` — rides the light like the Figma noise
                fill, so the bright end of the gradient keeps its texture

   .grain--page pins a pass over the whole document, above every section and
   below the header, so the texture never stops. The two passes are separate
   top-level layers on purpose: wrapping them would trap `overlay` inside its
   own stacking context instead of blending with the page behind it.          */

.grain {
  position: absolute;
  inset: 0;
  background-image: url("../images/noise.png");
  background-size: 220px 220px;
  opacity: var(--grain-opacity, var(--grain-field));
  pointer-events: none;
}

.grain--soft {
  background-image: url("../images/noise-soft.png");
  background-position: 60px 40px;
  mix-blend-mode: overlay;
  opacity: var(--grain-soft-opacity, var(--grain-soft));
}

.grain--page {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.grain--soft.grain--page { z-index: 51; }

/* ---- a11y ---------------------------------------------------------------- */

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