/* ==========================================================================
   Laura Suarez — Portfolio
   Mobile-first. Breakpoints match the Figma frames:
     mobile  < 720px   (frame: 390)
     tablet  720–1079  (frame: 810)
     desktop ≥ 1080    (frame: 1326)
   ========================================================================== */

:root {
  /* Color */
  --ink-900: #0f172a;      /* card titles */
  --ink-700: #1e3a5f;      /* eyebrows, body copy, footer */
  --ink-nav: #133a5e;      /* nav + desktop hero copy */
  --tag-bg: #e8f0fe;
  --tag-ink: #174ea6;
  --glass-border: #8faec7;
  --glass-fill: rgba(255, 255, 255, 0.23);
  --glass-shadow: 0 4px 16px rgba(120, 90, 200, 0.06);
  --focus: #006ebd;

  /* Type */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --font-eyebrow: "Geist", var(--font-sans);

  /* Page background (angle is re-tuned per frame, as in Figma) */
  --bg-angle: 100.64deg;

  --radius-card: 24px;
  --radius-pill: 100px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Hero typewriter: a lighter tint of the title blue (still ≥3:1 on the page for large text) */
  --typer-ink: #5b8fbf;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  min-height: 100vh;
  background: #edf5fc;
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: #fff; color: var(--ink-nav);
  font-weight: 600; font-size: 13px; letter-spacing: 0.91px; text-transform: uppercase;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Page + background ---------- */
.page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-top: 32px;
  overflow-x: clip;
}
.page > main { width: 100%; display: flex; flex-direction: column; align-items: center; }

.page__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(
    var(--bg-angle),
    rgb(199, 224, 245) 3.21%,
    rgb(217, 235, 247) 17.25%,
    rgb(237, 245, 252) 35.96%,
    rgb(255, 255, 255) 67.78%,
    rgb(199, 224, 245) 96.79%
  );
}
.page__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: url("../img/texture.jpg") center / cover no-repeat;
  background-image: image-set(url("../img/texture.webp") type("image/webp"), url("../img/texture.jpg") type("image/jpeg"));
}

/* ---------- Shared glass pill ---------- */
.glass,
.btn-pill,
.nav__list,
.nav__toggle {
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--glass-shadow);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 16px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none; /* only the controls catch clicks while floating */
}
.nav { position: relative; pointer-events: auto; }

.nav__toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav__toggle:hover { background: rgba(255, 255, 255, 0.45); }
.nav__toggle:active { transform: scale(0.96); }
.nav__icon { grid-area: 1 / 1; transition: opacity 0.2s var(--ease), transform 0.25s var(--ease); }
.nav__icon--close {
  position: relative;
  width: 30px; height: 30px;
  opacity: 0; transform: rotate(-45deg);
}
.nav__icon--close::before,
.nav__icon--close::after {
  content: "";
  position: absolute;
  left: 6px; right: 6px; top: 50%;
  height: 3px; margin-top: -1.5px;
  border-radius: 2px;
  background: rgba(15, 23, 42, 0.7);
  transform: rotate(45deg);
}
.nav__icon--close::after { transform: rotate(-45deg); }
.nav.is-open .nav__icon--menu { opacity: 0; transform: rotate(45deg); }
.nav.is-open .nav__icon--close { opacity: 1; transform: none; }

/* Mobile: list becomes a glass dropdown under the toggle */
.nav__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-color: #fff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
}
.nav.is-open .nav__list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s;
}
.nav__link {
  display: block;
  padding: 12px 16px;
  border-radius: 20px;
  color: var(--ink-nav);
  font-weight: 600;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.91px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease);
}
.nav__link:hover { background: rgba(255, 255, 255, 0.6); }

/* ---------- Hero ---------- */
.hero {
  width: 100%;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.hero__content { display: contents; }

.hero__title {
  --title-angle: 45.46deg;
  width: fit-content; /* gradient spans the glyphs, as in Figma */
  max-width: none;     /* the widest typed phrase may run into the hero padding; flex centering keeps it centred */
  font-family: var(--font-serif);
  font-weight: 400;
  /* 38px per Figma, scaled down on narrow phones so "I design for engagement." fits (≈10.5em wide) */
  font-size: min(38px, calc((100vw - 40px) / 10.6));
  line-height: 1.158;
  letter-spacing: -1px;
  color: #006ebd; /* fallback if background-clip:text is unsupported */
  /* Figma stops (15.5% / 45.2% / 119.38%) remapped to the glyph box: Figma's gradient
     line overshoots the text, so only ~31%–85% of it is visible. */
  background-image: linear-gradient(var(--title-angle), rgb(55, 55, 55) -28.7%, rgb(0, 110, 189) 26.3%, rgb(27, 27, 27) 163.7%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}
.hero__line { white-space: nowrap; }

/* Typewriter phrase ("for ease." → "for engagement." → "experiences.") */
.typer { -webkit-text-fill-color: var(--typer-ink); color: var(--typer-ink); }
/* With JS the phrase stays out of the layout until the animation takes over (no flash, no shift) */
.js .typer:not(.is-ready) { display: none; } /* takes no space, so "I design" is centred from the first paint */
@media (prefers-reduced-motion: reduce) {
  .js .typer:not(.is-ready) { display: inline; } /* no animation: show the first phrase straight away */
}
.hero__sizer { display: block; height: 0; overflow: hidden; visibility: hidden; white-space: nowrap; }
.typer.is-empty .typer__dot { display: none; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__lede {
  width: 100%;
  color: var(--ink-700);
  opacity: 0.85;
  font-size: 15px;
  line-height: 22px;
  text-wrap: pretty;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 10px 20px;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 11px;
  line-height: normal;
  letter-spacing: 0.91px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn-pill:hover {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 20px rgba(120, 90, 200, 0.1);
}
.btn-pill:active { transform: translateY(1px); }

/* ---------- Projects ---------- */
.projects {
  width: 100%;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.49);
  transform: translateZ(0); /* keeps rounded clipping crisp during image scale */
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card__media {
  position: relative;
  flex: none;
  height: 220px;
  overflow: hidden;
}
/* Mockups are transparent cut-outs shown whole (never cropped); the tint lives on the slot. */
#engagement-retention .card__media { background: #ecd3cd; }
#collaborative-budgeting .card__media { background: rgba(0, 100, 45, 0.2); }
#ai-user-personas .card__media { background: rgba(0, 115, 185, 0.2); }
.card__media img {
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  object-fit: contain;
  transition: transform 0.7s var(--ease);
}
.card__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}
.card__brand { display: flex; flex-direction: column; gap: 8px; }
.card__eyebrow {
  color: var(--ink-700);
  font-family: var(--font-eyebrow);
  font-weight: 700;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.card__title {
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
}
.br-wide { display: none; }

.card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--tag-bg);
  color: var(--tag-ink);
  font-weight: 700;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(19, 58, 94, 0.28); }
  .card:hover .card__media img { transform: scale(1.03); }
}

/* ---------- Footer ---------- */
.footer {
  width: 100%;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer__rule {
  height: 5px;
  border-top: 0.66px solid rgba(255, 255, 255, 0.6);
  border-bottom: 0.66px solid rgba(255, 255, 255, 0.6);
}
.footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-700);
  font-weight: 400;
  font-size: 10px;
  line-height: normal;
  letter-spacing: 0.91px;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Mobile: links sit under the copyright line; "Back to top" stays right, level with the links */
.footer__content { flex-wrap: wrap; align-items: flex-end; row-gap: 12px; }
.footer__left { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__social { display: flex; align-items: center; gap: 10px; }
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.footer__top span {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.footer__top:hover span { background-size: 100% 1px; }
.footer__top svg { flex: none; transition: transform 0.3s var(--ease); }
.footer__top svg path { stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.footer__top:hover svg { transform: translateY(-2px); }
.footer__social a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.footer__social a:hover { background-size: 100% 1px; }

/* ---------- "Copied" tooltip (contact button + footer Email link) ---------- */
.copy-link { position: relative; }
.copy-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 11px;
  border-radius: var(--radius-pill);
  background: var(--ink-nav);
  box-shadow: 0 8px 20px -8px rgba(19, 58, 94, 0.45);
  color: #fbfdff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px) scale(0.96);
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.copy-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 2px;
  background: inherit;
  transform: rotate(45deg);
}
.copy-tip svg { flex: none; }
.copy-tip svg path { stroke: #7fe0d0; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.is-copied > .copy-tip { opacity: 1; transform: translate(-50%, 0) scale(1); }
/* If the browser refuses the copy, the tooltip shows the address itself */
.is-copy-failed > .copy-tip { padding-left: 14px; letter-spacing: 0; }
.is-copy-failed > .copy-tip svg { display: none; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-visible:hover { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }

/* ==========================================================================
   Tablet — frame 810
   ========================================================================== */
@media (min-width: 720px) {
  :root { --bg-angle: 111.95deg; }
  html { scroll-padding-top: 24px; }

  .page { padding-top: 48px; }

  /* Static, centered pill nav (not sticky on tablet in the design) */
  .navbar {
    position: relative;
    justify-content: center;
    padding: 16px 48px;
    pointer-events: auto;
  }
  .nav__toggle { display: none; }
  .nav__list {
    position: static;
    min-width: 0;
    /* equal-width buttons: every column is as wide as the widest label */
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-color: var(--glass-border);
    border-radius: var(--radius-pill);
    background: var(--glass-fill);
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .nav__link { padding: 6px 14px; text-align: center; }

  .hero { padding: 60px 48px; gap: 24px; }
  .hero__title { --title-angle: 35.92deg; font-size: 56px; line-height: 64px; }
  .hero__lede { max-width: 580px; font-size: 18px; line-height: 26px; }
  .btn-pill { height: 48px; padding: 12px 24px; gap: 10px; font-size: 12px; }

  .projects { padding: 40px 48px; gap: 48px; }

  .card {
    flex-direction: row;
    height: 320px;
    background: none;
  }
  .card__media { height: 100%; width: 50.42%; } /* 360 / 714 */
  .card--media-right .card__media { order: 2; }
  .card__panel {
    flex: 1 1 0;
    min-width: 0;
    justify-content: space-between;
    padding: 32px;
    background: var(--glass-fill);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.8);
  }
  .card--media-right .card__panel { border-radius: var(--radius-card) 0 0 var(--radius-card); }
  .card--media-left .card__panel { border-radius: 0 var(--radius-card) var(--radius-card) 0; }
  .card__brand { gap: 12px; }
  .card__title { font-size: 26px; }
  .br-wide { display: inline; }

  .footer { width: calc(100% - 96px); }
  .footer__content { font-size: 11px; }
  .footer__content { align-items: center; }
  .footer__left { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
  .footer__social { gap: 24px; }
}

/* ==========================================================================
   Desktop — frame 1326
   ========================================================================== */
@media (min-width: 1080px) {
  :root { --bg-angle: 112.28deg; }
  html { scroll-padding-top: 120px; }

  .page { padding: 60px 0 0; }

  .navbar {
    position: sticky;
    width: 911px;
    padding: 16px 48px;
    pointer-events: none;
  }
  .nav { padding: 16px 0; pointer-events: none; }
  .nav__list { pointer-events: auto; }
  .nav__list { height: 56px; padding: 12px 16px; }
  .nav__link { line-height: 19.5px; }

  .hero {
    position: relative;
    z-index: 1;
    width: 912px;
    padding: 0;
    gap: 0;
    justify-content: center;
    filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.03));
  }
  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    padding: 72px 48px;
  }
  .hero__title { --title-angle: 41.72deg; font-size: 85px; line-height: 90px; }
  .hero__lede { max-width: 614px; color: var(--ink-nav); font-size: 20px; line-height: 28px; }
  .btn-pill { height: 56px; color: var(--ink-nav); font-size: 13px; line-height: 19.5px; }

  .projects { width: 1000px; padding: 60px 0; gap: 100px; }

  .card { height: 560px; }
  .card__media { width: 618px; }
  .card__media img { padding: 16px 24px; }
  .card__panel {
    flex: none;
    width: 382px;
    padding: 56px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff);
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.4);
  }
  .card--media-left .card__panel { background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
  .card__brand { gap: 16px; }
  .card__title { font-size: 40px; line-height: 1.1; letter-spacing: -1px; }
  .card__tags { gap: 8px; }

  .footer { width: 100%; padding: 32px 20px; }
  .footer__content { font-weight: 600; font-size: 13px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Home: contact CTA
   (reference: joeparkerrees.co.uk, restyled in this site's palette)
   ========================================================================== */
@property --cta-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.cta {
  --cta-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --cta-ink: rgba(19, 58, 94, 0.34);          /* doodles at rest */
  --cta-text: rgba(19, 58, 94, 0.62);         /* button label at rest */
  --cta-outline: var(--glass-border);
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: clip;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 180px 20px;
  scroll-margin-top: 0;
}
.cta__blobs {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* fade in and out so there is no hard edge where the section starts or ends */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 65%, transparent);
}

/* "Hot" state (hover / keyboard focus) only touches the button: glow ring + darker label */
.cta:has(.cta__button:focus-visible) { --cta-text: var(--ink-nav); }

/* ---- Button ---- */
.cta__button {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-pill);
  outline-offset: 6px;
}
.cta__pill {
  position: relative;
  display: block;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
}
/* Frosted fill, like the hero's glass pill */
.cta__pill::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.15));
  box-shadow:
    inset 0 2px 1px -1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 2px -1px rgba(19, 58, 94, 0.08),
    0 1px 2px -1px rgba(19, 58, 94, 0.1),
    0 2px 4px rgba(19, 58, 94, 0.06),
    0 8px 16px -4px rgba(120, 90, 200, 0.08);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  transition: opacity 0.5s var(--cta-ease);
}

/* Outline that traces itself in */
.cta__outline {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  overflow: visible;
  pointer-events: none;
}
.cta__outline rect {
  fill: none;
  stroke: var(--cta-outline);
  stroke-width: 1.5px;
  stroke-dasharray: var(--outline-len, 0);
  stroke-dashoffset: var(--outline-len, 0);
  transition: stroke-dashoffset 1s var(--cta-ease) 0.55s, stroke 0.5s var(--cta-ease);
}
.cta.is-in .cta__outline rect { stroke-dashoffset: 0; }

.cta__label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.28em;
  color: var(--cta-text);
  font-size: 18px;
  line-height: normal;
  letter-spacing: -0.01em;
  text-align: center;
  transition: color 0.5s var(--cta-ease);
}
.cta__word {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-26px);
  transition:
    opacity 0.5s var(--cta-ease) calc(var(--i) * 90ms),
    filter 0.6s var(--cta-ease) calc(var(--i) * 90ms + 0.15s),
    transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) calc(var(--i) * 90ms);
}
.cta.is-in .cta__word { opacity: 1; filter: blur(0); transform: none; }

/* Spinning brand-colour ring + glow on hover */
.cta__glow,
.cta__ring {
  position: absolute;
  border-radius: var(--radius-pill);
  background: conic-gradient(from var(--cta-angle), #8fd0ff, #b9a6ff, #7fe0d0, #8fd0ff);
  opacity: 0;
  pointer-events: none;
  animation: cta-spin 6s linear infinite;
  transform: translateZ(0);
}
.cta__glow--soft { inset: -8px; filter: blur(20px); transition: opacity 0.7s var(--cta-ease); }
.cta__glow--tight { inset: -3px; filter: blur(8px); transition: opacity 0.6s var(--cta-ease); }
.cta__ring {
  inset: -2px;
  padding: 2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  transition: opacity 0.5s var(--cta-ease);
}
.cta:has(.cta__button:focus-visible) .cta__glow--soft { opacity: 0.5; }
.cta:has(.cta__button:focus-visible) .cta__glow--tight { opacity: 0.6; }
.cta:has(.cta__button:focus-visible) .cta__ring { opacity: 1; }
@media (hover: hover) {
  .cta:has(.cta__button:hover) { --cta-text: var(--ink-nav); }
  .cta:has(.cta__button:hover) .cta__glow--soft { opacity: 0.5; }
  .cta:has(.cta__button:hover) .cta__glow--tight { opacity: 0.6; }
  .cta:has(.cta__button:hover) .cta__ring { opacity: 1; }
}
@keyframes cta-spin { to { --cta-angle: 360deg; } }

/* ---- Doodles (desktop/tablet only, as in the reference) ---- */
.cta__doodles {
  display: none;
  position: absolute;
  inset: 0;
  color: var(--cta-ink);
  pointer-events: none;
  transition: color 0.5s var(--cta-ease);
}
.doodle { position: absolute; overflow: visible; }
.doodle path {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.7s var(--cta-ease) var(--d, 1.6s);
}
.cta.is-in .doodle path { stroke-dashoffset: 0; }

.doodle--smiley { bottom: 100%; right: 6%; margin-bottom: 16px; transform: rotate(6deg); --d: 2.35s; }
.doodle--arrow-in { bottom: 100%; left: 8%; margin-bottom: 2px; transform: translateX(-50%) rotate(-8deg); --d: 1.6s; }
.doodle--arrow-up { top: 100%; right: 10%; margin-top: 6px; transform: translateX(50%) rotate(7deg); --d: 1.75s; }
.doodle--heart { top: 100%; left: 16%; margin-top: 12px; transform: rotate(-10deg); --d: 1.9s; }
.doodle--sparkle { right: 100%; top: 50%; margin-right: 28px; transform: translateY(-50%) rotate(12deg); --d: 2.05s; }
.doodle--wave { left: 100%; top: 50%; margin-left: 26px; transform: translateY(-50%) rotate(-6deg); --d: 2.2s; }
.doodle--smiley path:first-child, .doodle--arrow-in path, .doodle--arrow-up path { stroke-width: 2.4; }
.doodle--arrow-in path + path, .doodle--arrow-up path + path { transition-delay: calc(var(--d) + 0.45s); }
.doodle--smiley path + path { transition-delay: calc(var(--d) + 0.35s); }

@media (min-width: 720px) {
  .cta { padding: 260px 48px; }
  .cta__pill { padding: 16px 36px; }
  .cta__outline rect { stroke-width: 2px; }
  .cta__label { font-size: 20px; }
  .cta__glow--soft { inset: -12px; filter: blur(28px); }
  .cta__glow--tight { inset: -4px; filter: blur(10px); }
  .cta__doodles { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .cta__word { opacity: 1; filter: none; transform: none; }
  .cta__outline rect, .doodle path { stroke-dashoffset: 0; }
  .cta__glow, .cta__ring { animation: none; --cta-angle: 180deg; }
}
