/* ==========================================================================
   vickyzuikova.com — design tokens from Figma (design-tokens.json)
   ========================================================================== */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "PP Neue Montreal";
  src: url("fonts/Neue Montreal/web/PPNeueMontreal-Regular.woff2") format("woff2"),
       url("fonts/Neue Montreal/web/PPNeueMontreal-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("fonts/Neue Montreal/web/PPNeueMontreal-Medium.woff2") format("woff2"),
       url("fonts/Neue Montreal/web/PPNeueMontreal-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("fonts/Neue Montreal/web/PPNeueMontreal-Semibold.woff2") format("woff2"),
       url("fonts/Neue Montreal/web/PPNeueMontreal-Semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* Neue Montreal Semibold Italic — used for headings (h3/h4) */
@font-face {
  font-family: "PP Neue Montreal";
  src: url("fonts/Neue Montreal/web/PPNeueMontreal-SemiboldItalic.woff2") format("woff2"),
       url("fonts/Neue Montreal/web/PPNeueMontreal-SemiboldItalic.woff") format("woff");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
/* PP Mondwest — display/accent font */
@font-face {
  font-family: "PP Mondwest";
  src: url("fonts/Mondwest/PPMondwest-Regular.woff2") format("woff2"),
       url("fonts/Mondwest/PPMondwest-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* primitives */
  --forest-50: #eef5f2;  --forest-100: #c9d5cf; --forest-600: #283e35;
  --forest-700: #10231c;
  --olive-50: #f1f7e1;   --olive-300: #acbc73;  --olive-400: #97a855;
  --olive-500: #83943e;  --olive-600: #707f2f;
  --olive-700: #5e6b22;
  --neutral-50: #faf9f7; --neutral-100: #e9e7e3; --neutral-600: #4d4a44;
  --neutral-900: #100e0b; --white: #ffffff;
  --teal-50: #e9f6fe;    --teal-100: #c1d6e4;

  /* semantic */
  --bg-primary-light: var(--forest-50);
  --bg-primary-dark: var(--forest-700);
  --bg-neutral: var(--neutral-50);
  --bg-secondary: var(--olive-500);
  --bd-primary: var(--forest-100);
  --bd-neutral: var(--neutral-100);
  --bd-secondary: #dae3bd; /* olive-100 */
  --text-heading: var(--forest-600);
  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-highlight: var(--olive-600);
  --icon-default: var(--forest-600);

  /* gradients */
  --gradient-main: linear-gradient(122.75deg, #10231c 12%, #283e35 45%, #97a855 100%);
  --gradient-light: linear-gradient(47.79deg, #faf9f7 26.71%, #faf9f7 54.29%, #f1f7e1 73.05%);
  --gradient-blue: linear-gradient(229.23deg, #c1d6e4 13.9%, #e9f6fe 41.5%, #faf9f7 76.74%);

  /* radius */
  --rd-sm: 4px; --rd-md: 8px; --rd-lg: 12px; --rd-xl: 16px; --rd-xxl: 24px;

  /* type — two families: Neue Montreal (main) + Mondwest (display) */
  --font-text: "PP Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "PP Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  --font-accent: "PP Mondwest", "Helvetica Neue", Arial, sans-serif;

  /* fluid section rhythm */
  --card-pad: 32px;
  --section-gap: clamp(36px, 4.2vw, 60px); /* sp-60 */
}

/* ---------- Base ---------- */

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

/* smooth same-origin page transitions (case studies slide up over the page) */
@view-transition { navigation: auto; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.4px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; }
p { margin: 0; text-wrap: pretty; } /* avoid orphan articles / single words on a line */
h1, h2, h3, h4 { text-wrap: pretty; }

.br-mobile { display: none; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }

.page {
  margin: 0 auto;
  padding: clamp(16px, 2.8vw, 40px) 5vw; /* gradient blocks: 5% side margins */
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* gradient blocks: classic 1280px cards by default;
   above 1500px they expand to full width (5% page margins),
   while their inner content stays aligned with the content column */
.hero, .about, .contact {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: max(var(--card-pad), calc((100% - 1216px) / 2));
}

@media (min-width: 1500px) {
  /* gradient blocks nearly full-bleed: side margins match the top margin,
     inner content aligned with the 1280px content column */
  .page { padding-inline: clamp(16px, 2.8vw, 40px); }
  .hero, .about, .contact {
    max-width: none;
    padding-inline: max(var(--card-pad), calc((100% - 1280px) / 2));
  }
}

.footer {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

/* non-gradient sections align to content width */
.work, .reviews {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

.card-gradient {
  background: var(--gradient-main);
  border-radius: var(--rd-xl);
  color: var(--white);
}

/* grain/noise overlay on all gradient backgrounds */
.card-gradient,
.product--blue,
.product--light {
  position: relative;
  isolation: isolate;
}
.card-gradient::after,
.product--blue::after,
.product--light::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  opacity: 0.16;
  mix-blend-mode: overlay;
}
.product--blue::after,
.product--light::after { opacity: 0.1; }

.accent {
  font-family: var(--font-accent);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  container-type: inline-size;
  overflow: hidden; /* masks the falling chips at the card frame */
  padding-top: var(--card-pad);
  padding-bottom: min(clamp(32px, 3.6vw, 52px), 5vh);
  display: flex;
  flex-direction: column;
  gap: min(clamp(72px, 7vw, 100px), 12vh);
}

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

.hero__logo {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: block;
}
.hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__header-links {
  display: flex;
  gap: clamp(24px, 5.5vw, 80px); /* squeezes before repositioning */
  text-align: right;
}

.hero__header-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hero__contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero__contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  /* button reset */
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}
.hero__contact-item:hover { text-decoration: none; }
.hero__contact-item img { width: 24px; height: 24px; }
.hero__contact-item,
.hero__contact-row .dot { cursor: pointer; }

.hero__header-title,
.hero__header-sub {
  font-size: clamp(16px, 1.7vw, 24px);
  line-height: 1.33;
  letter-spacing: 0.96px;
}
.hero__header-title { font-weight: 600; }
.hero__header-sub a { text-decoration: none; }

/* "Kyiv, Ukraine" rolls up to local time on hover (slot-machine style) */
.hero__roll {
  overflow: hidden;
  height: 1.33em; /* one line */
}
.hero__roll-inner {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero__roll-line {
  display: block;
  height: 1.33em;
  white-space: nowrap;
}
@media (hover: hover) {
  .hero__roll:hover .hero__roll-inner { transform: translateY(-50%); }
}

.hero__body {
  display: flex;
  flex-direction: column;
  gap: min(clamp(72px, 7vw, 100px), 12vh);
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 24px; /* sp-24 */
}

.hero__title {
  margin: 0;
  font-weight: 400;
  font-size: min(clamp(44px, 6.4vw, 92px), 12vh);
  line-height: 1.087; /* 100/92 */
  letter-spacing: 0.02em;
}
.hero__title .accent { letter-spacing: 0; }

.hero__title-row {
  display: flex;
  align-items: center;
  gap: 24px; /* sp-24 */
}

.hero__gif {
  width: clamp(66px, 9.7vw, 140px);
  height: auto;
  aspect-ratio: 140 / 100;
  flex: 0 0 auto;
  border-radius: var(--rd-lg); /* rd-12, matches the baked corners */
  object-fit: cover;
}

.hero__subtitle {
  /* cqi cap keeps the first line ("…unclear ideas") on one line inside the card */
  font-size: min(clamp(20px, 2.8vw, 40px), 5.5vh, 3.3cqi);
  line-height: 1.3; /* 52/40 */
  letter-spacing: 0.02em;
}

@media (min-width: 721px) {
  .hero__subtitle .line-keep { white-space: nowrap; }
  .hero__header-title,
  .hero__header-sub { white-space: nowrap; }
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* sp-12 */
  max-width: 862px; /* wraps chips into two rows as designed */
}

.chip-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 48px; /* sp-12 + 24 icon + sp-12 */
  padding: 0 24px;
  border-radius: 9999px;
  background: var(--bg-primary-dark);
  font-weight: 600;
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip-lg img { width: 24px; height: 24px; }

/* ==========================================================================
   WORK
   ========================================================================== */

.work {
  display: grid;
  grid-template-columns: 1.1806fr 1fr; /* 680 : 576 */
  gap: 24px;
  align-items: start;
}

.work__col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.product {
  border-radius: var(--rd-xl);
  padding: var(--card-pad);
  padding-top: 48px; /* sp-48 */
  display: flex;
  flex-direction: column;
  gap: 40px;
  overflow: hidden;
}

/* card variants */
.product--dark    { background: var(--forest-600); color: var(--white); padding: 0; }
.product--neutral { background: var(--bg-neutral); }
.product--blue    { background: var(--gradient-blue); padding: 0; }
.product--white   { background: var(--white); border: 1px solid var(--bd-neutral); }
.product--light   { background: var(--gradient-light); }
.product--olive   { background: var(--olive-50); }

/* full-bleed cards re-inset their text blocks */
.product__top--inset  { padding: 48px var(--card-pad) 0; }
.product__meta--inset { padding: 0 var(--card-pad) var(--card-pad); }

/* top block: eyebrow row + headline */
.product__top {
  display: flex;
  flex-direction: column;
  gap: 16px; /* sp-16 */
}

.product__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: inherit;
  text-decoration: none; /* headers can be links to the company website */
}

/* lock badge on NDA cards — sits opposite the eyebrow in the header row */
.product__lock { width: 24px; height: 24px; flex: 0 0 auto; }

[data-case-url] { cursor: pointer; }

.product__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* sp-8 */
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-heading);
}
.product__eyebrow--inverse { color: var(--white); }

.product__logo {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: var(--rd-sm);
  overflow: hidden;
}
.product__logo img { width: 100%; height: 100%; }
.product__logo--plain { border-radius: 0; overflow: visible; }

.product__headline {
  margin: 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 600;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 0.64px;
  color: var(--text-heading);
}
.product__headline--inverse { color: var(--white); }

/* headline is now a single Neue Montreal Semibold Italic run */
.product__verb {
  font: inherit;
  letter-spacing: inherit;
}

.product__locker {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.product__media img,
.product__media video {
  display: block;
  width: 100%;
  height: auto;
}
.product__media video {
  border-radius: var(--rd-lg);
}
.product__media--portfolio {
  padding: 16px; /* sp-16 around the video */
}
.product__media--portfolio video {
  /* cropped tight to the artwork, so a corner radius would clip the monitor */
  border-radius: 0;
  /* video is cropped to its visible content, so the padding reads true */
  aspect-ratio: 892 / 794;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.product__media--framed img {
  border: 1px solid var(--bd-neutral);
  border-radius: var(--rd-lg);
}

.product__meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px; /* sp-8 + 20 + sp-8 */
  padding: 0 16px;
  border-radius: 9999px;
  background: var(--bg-secondary);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about {
  padding-top: clamp(40px, 5.5vw, 80px);
  padding-bottom: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 5.5vw, 80px);
}

.about__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 2.8vw, 40px);
}

.about__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.33;
  letter-spacing: 0.48px;
}

.about__photo {
  width: min(443px, 38%);
  flex: 0 0 auto;
}
.about__photo img { width: 100%; height: auto; }

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; /* sp-16 */
}

.principle {
  background: var(--bg-primary-dark);
  border-radius: var(--rd-md);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px; /* sp-40 */
}
.principle img { width: 32px; height: 32px; }

.principle__text {
  display: flex;
  flex-direction: column;
  gap: 16px; /* sp-16 */
}

.principle h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: 0.56px;
}

/* ==========================================================================
   REVIEWS
   ========================================================================== */

.reviews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.reviews__col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.review {
  margin: 0;
  border: 1px solid var(--bd-primary);
  border-radius: var(--rd-xl);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.review__quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review__mark { align-self: flex-end; }

.review__text {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hl { color: var(--text-highlight); font-weight: 600; font-style: normal; }

.review__person {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.review__person > div {
  display: flex;
  flex-direction: column;
  gap: 4px; /* sp-4 between name and role */
}

.review__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.review__name-row img { width: 24px; height: 24px; }
.review__person > img {
  width: 60px;
  height: 60px;
  border-radius: var(--rd-lg);
  object-fit: cover;
}

.review__name {
  font-weight: 600;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: 0.48px;
}

.review__role {
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.32px;
}

/* ==========================================================================
   CONTACT + FOOTER
   ========================================================================== */

.contact-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact {
  padding-block: clamp(40px, 5.5vw, 80px);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 5.5vw, 80px);
}

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

.contact__title {
  margin: 0;
  font-size: clamp(44px, 6.95vw, 100px);
  line-height: 1.08;
  font-weight: 400;
}

.contact__status {
  text-align: right;
  font-weight: 400;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.33;
  letter-spacing: 0.96px;
}

/* status: right-aligned 3 lines by default; when it moves under the
   title (below 1240px) it becomes left-aligned, always 2 lines */
.sbr-n { display: none; }

@media (max-width: 1240px) {
  .contact__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .contact__status { text-align: left; }
  .sbr-w { display: none; }
  .sbr-n { display: inline; }
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact__link-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.7vw, 24px);
  min-width: 0;
}

.contact__link {
  font-size: clamp(17px, 4.6vw, 60px);
  line-height: 1.13;
  letter-spacing: 1.2px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact__link:hover { text-decoration: none; }

.contact__icon-btn {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}
.contact__icon-btn img { width: clamp(32px, 3.5vw, 50px); height: auto; }

.contact__copied {
  font-size: 16px;
  letter-spacing: 0.32px;
  opacity: 0.9;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-primary);
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--rd-sm);
  background: var(--icon-default);
}

.footer__credit {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px; /* sp-2 between the two chunks */
}
.footer__credit img { width: 24px; height: 24px; }
.footer__chunk {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* sp-8 */
  white-space: nowrap;
}

/* ==========================================================================
   CURSOR DOT
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
  * { cursor: none !important; }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-secondary);
    pointer-events: none;
    z-index: 2000;
    opacity: 0;
    will-change: transform;
    transition: background 0.15s ease;
  }
  /* over anything interactive the dot deepens to olive-700 */
  .cursor-dot.is-hovering { background: var(--olive-700); }
  .cursor-dot.is-active { opacity: 1; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
}

/* ==========================================================================
   TOOLTIP
   ========================================================================== */

.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #faf9f7 21%, #faf9f7 68%, #f1f7e1 100%);
  border: 1px solid var(--bd-secondary); /* olive-100 */
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  color: var(--forest-700);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tooltip.is-visible {
  opacity: 1;
  transform: none;
}
.tooltip img { width: 24px; height: 24px; }

@media (hover: none) {
  .tooltip { display: none; }
}

/* ==========================================================================
   COPY TOAST — touch devices only; the tooltip above is hover-only, so a tap
   to copy the email would otherwise give no feedback at all.
   ========================================================================== */

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 9999px;
  background: var(--forest-700);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (hover: hover) and (pointer: fine) {
  .copy-toast { display: none; }
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   PINNED HERO — the rest of the page slides up and covers it (astryx-style)
   Enabled via .pin-hero on <body> only when the hero fits the viewport.
   ========================================================================== */

.pin-hero .hero {
  position: sticky;
  top: clamp(16px, 2.8vw, 40px); /* holds at its initial position */
  z-index: 0;
}

.page-rest {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  position: relative;
  z-index: 1;
  /* full-bleed: the sheet spans the whole viewport width */
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%); /* content stays aligned with the column */
  padding-top: clamp(36px, 4.2vw, 60px); /* sp-60, part of the white sheet */
  background: var(--white); /* occludes the pinned hero as it slides over */
  border-top: 1px solid var(--bd-secondary); /* br-sm */
  border-radius: var(--rd-xl) var(--rd-xl) 0 0;
}

body { overflow-x: hidden; } /* 100vw includes the scrollbar; clip the sliver */

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* header squeezes first; only when the single row can't fit,
   the logo moves to its own row (stage 2 of the header progression) */
@media (max-width: 1190px) {
  .hero__header {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .hero__header-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 32px 60px;
    text-align: left;
  }
  .hero__header-links .hero__header-col {
    align-items: flex-start;
    text-align: left;
  }

  /* subtitle wraps naturally at this stage */
  .hero__subtitle .br-desktop { display: none; }
  .hero__subtitle .nowrap { white-space: normal; }
}

@media (max-width: 1100px) {
  /* chip switches to the small-with-icon variant (sp-8 vertical, sp-16 sides) */
  .chip-lg {
    height: 40px; /* sp-8 + 24 icon + sp-8 */
    padding: 0 16px;
    gap: 12px;
  }
  /* single column; wrappers dissolve so cards can be reordered */
  .work {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .work__col { display: contents; }
  .product--dark    { order: 1; } /* TrustPoint */
  .product--light   { order: 2; } /* Otalio */
  .product--white   { order: 3; } /* Termosafe */
  .product--neutral { order: 4; } /* Fleeture */
  .product--blue    { order: 5; } /* Trackimo */
  .product--olive   { order: 6; } /* Portfolio */

  /* Termosafe video narrower, centered */
  .product--white .product__media {
    width: 67.5%;
    margin-inline: auto;
  }

  .reviews { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, 1fr); }

  /* About: photo on top-left, text below at full width */
  .about__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  .about__text { max-width: none; }
  .about__photo {
    order: -1;
    width: 238px;
    align-self: flex-start;
  }
}

@media (max-width: 720px) {
  /* --- page frame: 8px margin all round --- */
  .page { padding: 8px; }
  .pin-hero .hero { top: 8px; }

  /* --- card padding: a single 24px inset everywhere --- */
  .hero, .about, .contact { --card-pad: 24px; }
  .product, .review { --card-pad: 24px; }
  .product { padding-top: var(--card-pad); }
  .product__top--inset { padding-top: var(--card-pad); }
  .principle { padding: var(--card-pad); }

  /* --- text runs the full column: no caps, no pretty-wrap ragging --- */
  .hero__chips { max-width: none; }
  .about__text { max-width: none; }
  p, h1, h2, h3, h4 { text-wrap: wrap; }

  .br-mobile { display: inline; }
  .br-desktop { display: none; }

  /* --- hero --- */
  .hero {
    padding-bottom: 40px;
    gap: 60px;
  }
  .hero__body { gap: 60px; }

  .hero__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .hero__header-links {
    flex-direction: column;
    gap: 32px;
    text-align: left;
  }
  .hero__header-col { align-items: flex-start; }

  /* logo trims to 32px tall; the inline SVG has to be told to scale with it */
  .hero__logo { width: 33px; height: 32px; }
  .hero__logo svg { display: block; width: 100%; height: 100%; }

  /* photo drops below the heading at its current size */
  .hero__title-row {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hero__title {
    font-size: clamp(44px, 9.4vw, 60px);
    line-height: 1.133; /* 68/60 */
  }
  .hero__gif { width: clamp(100px, 21vw, 140px); }

  /* type scale below is a flat 0.85 of the desktop mobile sizes */
  .hero__subtitle {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 0.4px;
  }

  .chip-lg { gap: 12px; }

  /* --- work --- */
  .product--white .product__media { width: 79.5%; }

  .product__headline {
    font-size: 27px;
    line-height: 34px;
    letter-spacing: 0.54px;
  }

  /* --- about + principles --- */
  .principles { grid-template-columns: 1fr; }

  /* --- reviews --- */
  .review { gap: 32px; }

  .review__name {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 0.4px;
  }

  /* --- contact --- */
  .contact {
    padding-block: 40px;
    gap: 80px;
  }
  .contact__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .contact__title { font-size: min(100px, 14.5vw); white-space: nowrap; }
  /* nowrap above is sized for "Let's connect". A longer, two-line title has to
     be allowed to wrap, and its hard break has to go, or it overflows the card. */
  .contact__title--wrap { white-space: normal; }
  .contact__title--wrap br { display: none; }
  .contact__status { text-align: left; }
  /* the status reflows as one paragraph: "full-time or fractional" stays with the roles */
  .sbr-n { display: none; }

  .contact__links { gap: 32px; }
  .contact__link {
    font-size: clamp(19px, 4.25vw, 27px);
    line-height: 1.125; /* 36/32 */
  }
  .contact__icon-btn img { width: 27px; }

  /* --- footer --- */
  .contact-wrap { gap: 24px; }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 17px;
    line-height: 24px;
    letter-spacing: 0.34px;
  }
  .footer__left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer__dot { display: none; }
  /* credit stays on one line */
  .footer__credit { flex-wrap: nowrap; }
  .footer__credit img { width: 20px; height: 20px; }
}
