/* ==========================================================================
   Studio Maraschino — landing page
   --------------------------------------------------------------------------
   Built from Website-01.svg (1440 × 5000 artboard).

   HOW SIZING WORKS
   Every desktop measurement is written as  calc(var(--u) * N)  where N is
   the value in pixels taken straight from the Illustrator artboard.
     --u = 1px  at 1440px wide and up (design is shown 1:1, centred)
     --u < 1px  between 1024px and 1440px (layout scales down proportionally)
   Below 1024px a separate mobile layout takes over (see bottom of file).

   TABLE OF CONTENTS
   01 Tokens        05 Buttons        09 Services
   02 Fonts         06 Header         10 About
   03 Base          07 Hero           11 Marquee strips
   04 Sections      08 Type cards     12 Contact
                                      13 Footer
                                      14 Mobile (< 1024px)
                                      15 Reduced motion
                                      16 Service pages
                                         (built from Website-Services.svg)
   ========================================================================== */


/* 01 TOKENS ================================================================ */
:root {
  /* Brand colours (from the design) */
  --red:        #ff303c;
  --cream:      #f2e5bd;
  --lilac:      #e2b0ff;
  --pink:       #ffb3c3;
  --lime:       #c4d96f;   /* "Anything sexy" in the audience strip */
  --plum:       #29051a;
  --ink:        #110a14;   /* header, footer, card hover */
  --paper:      #fff7e9;   /* form fields */
  --grey:       #545454;   /* form placeholders */

  /* Card gradient (dark top → red bottom) */
  --card-gradient: linear-gradient(0deg,
      #ff303c 7%, #be2231 25.4%, #881829 43%, #5f0f22 58.8%,
      #41091d 73.7%, #2f061b 86%, #29051a 94.8%);

  /* Fonts */
  --f-display:  "korolev-compressed", "Arial Narrow", sans-serif;   /* Korolev Compressed Bold */
  --f-script:   "medusa", "Stacktwin", serif;                        /* Medusa */
  --f-black:    "Stacktwin", serif;                                  /* Stacktwin (blackletter) */
  --f-flirt:    "Quiet Luxury Script", "medusa", serif;              /* hero "Flirt" */
  --f-body:     "Manrope", system-ui, sans-serif;                    /* Manrope Light */
  --f-dot:      "Neue Haas Grotesk Display Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Design unit: 1 design pixel (see header comment) */
  --u: clamp(0.7112px, calc(100vw / 1440), 1px);
  /* Unit for the background gradients (same as --u on desktop) */
  --g: var(--u);

  /* Tilt used by all text on cards & buttons in the design */
  --text-tilt: rotate(-3.6deg) skewX(-6.8deg) scaleY(.985);

  --header-h: calc(var(--u) * 122);
}


/* 02 FONTS ================================================================= */
@font-face {
  font-family: "Stacktwin";
  src: url("../fonts/stacktwin.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quiet Luxury Script";
  src: url("../fonts/quietluxury-script.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-variable.woff") format("woff");
  font-weight: 200 800;   /* variable font: we use 300 (Light) */
  font-style: normal;
  font-display: swap;
}


/* 03 BASE ================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

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

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


/* 04 SECTIONS ============================================================== */
/* Each section paints its own slice of the page-long background gradient,
   with the film-grain texture on top. Gradient colours were sampled from the
   design and slightly darkened to compensate for the grain overlay.          */
.section {
  position: relative;
  background-color: #030007;
  background-image: url("../images/grain.png"), var(--bg);
  background-size: 160px 160px, 100% 100%;
}

.hero       { --bg: linear-gradient(180deg, #030007 0, #030007 100%); }
.types      { --bg: linear-gradient(180deg, #040007 calc(var(--g) * 0), #1a000c calc(var(--g) * 420), #1e000e calc(var(--g) * 720)); }
.audience   { --bg: linear-gradient(180deg, #1e000e calc(var(--g) * 0), #21000e calc(var(--g) * 30), #2b0010 calc(var(--g) * 60), #570117 calc(var(--g) * 140), #9e0f21 calc(var(--g) * 230), #ff2432 calc(var(--g) * 330), #ff2633 calc(var(--g) * 360)); }
.services   { --bg: linear-gradient(180deg, #ff2633 calc(var(--g) * 0), #ff2532 calc(var(--g) * 70), #c41728 calc(var(--g) * 180), #840a1d calc(var(--g) * 300), #570117 calc(var(--g) * 400), #340011 calc(var(--g) * 500), #1f000e calc(var(--g) * 610), #1e000d calc(var(--g) * 900)); }
.about      { --bg: linear-gradient(180deg, #1e000d calc(var(--g) * 0), #1b000c calc(var(--g) * 140), #040007 calc(var(--g) * 370), #030007 calc(var(--g) * 800)); }
.discretion { --bg: linear-gradient(180deg, #030007 0, #030007 100%); }
.contact    { --bg: linear-gradient(180deg, #15000a calc(var(--g) * 0), #fb2330 calc(var(--g) * 330), #ff2634 calc(var(--g) * 360), #ff2633 calc(var(--g) * 970)); }

/* Section titles: Korolev Compressed Bold, 50px, +100 tracking */
.section-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: calc(var(--u) * 50);
  line-height: 1;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--cream);
  /* letter-spacing adds space after the last letter; balance it so the title is truly centred */
  padding-left: .1em;
}


/* 05 BUTTONS =============================================================== */
/* A tilted parallelogram (left & right edges stay vertical, top & bottom
   slope up). The shape is drawn by ::before so the label can get its own
   tilt, exactly like in the design.                                         */
.btn {
  --k: var(--u);                       /* size unit (small button overrides it) */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width:  calc(var(--k) * 203.4);
  height: calc(var(--k) * 52.3);
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  font-family: var(--f-black);
  font-size: calc(var(--k) * 25.49);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  border-radius: calc(var(--k) * 3);
  transform: skewY(-3.81deg);
  transform-origin: left top;
  transition: background-color .15s ease, box-shadow .25s ease;
}

.btn__label {
  position: relative;
  /* centre of the label follows the slope of the shape */
  transform: translateY(calc(var(--k) * -3.6)) var(--text-tilt);
  transition: color .15s ease;
}

/* Hover (mouse only): a small lift */
@media (hover: hover) {
  .btn:hover { transform: translateY(calc(var(--k) * -3)); }
  .btn:hover::before { box-shadow: 0 calc(var(--k) * 10) calc(var(--k) * 24) rgb(0 0 0 / .35); }
}

/* Click state from the design: cream shape, red text */
.btn:active::before { background: var(--cream); }
.btn:active         { color: var(--red); transform: none; }

/* Cream version ("shall we?" band on the service pages): cream shape, red text */
.btn--cream { color: var(--red); }
.btn--cream::before { background: var(--cream); }
.btn--cream:active { color: var(--cream); }
.btn--cream:active::before { background: var(--red); }

/* Small version in the header (80% of the hero button) */
.btn--small {
  --k: calc(var(--u) * .8013);
}


/* 06 HEADER ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 calc(var(--u) * 173) 0 calc(var(--u) * 140);
  background: var(--ink);
}

.site-header__logo img {
  width: calc(var(--u) * 163);
  height: auto;
  margin-top: calc(var(--u) * -12);   /* logo sits slightly above the nav line in the design */
}

.site-nav {
  display: contents;                    /* on desktop the nav items sit directly in the header bar */
}

.site-nav__list {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: calc(var(--u) * 50);
}

.site-nav__list a,
.site-nav__toggle {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: calc(var(--u) * 25);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  transition: color .2s ease;
}

.site-nav__list a:hover { color: var(--red); }

/* "Services" opens a dropdown with the four service pages */
.site-nav__toggle {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.has-menu { position: relative; }

.site-nav__menu {
  position: absolute;
  left: 50%;
  top: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 18);
  /* the panel continues the header bar downwards; the top padding also
     bridges the gap so the mouse can travel from "Services" to the list */
  padding: calc(var(--u) * 46) calc(var(--u) * 40) calc(var(--u) * 30);
  background: var(--ink);
  border-radius: 0 0 calc(var(--u) * 8.5) calc(var(--u) * 8.5);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(var(--u) * -6));
  transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
}

.site-nav__menu a { font-size: calc(var(--u) * 21); }
.site-nav__menu a[aria-current="page"] { color: var(--red); }

.has-menu.is-open .site-nav__toggle { color: var(--red); }
.has-menu.is-open .site-nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity .2s ease, transform .2s ease;
}

@media (hover: hover) and (min-width: 1024px) {
  .has-menu:hover .site-nav__toggle { color: var(--red); }
  .has-menu:hover .site-nav__menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .2s ease, transform .2s ease;
  }
}

.site-nav__cta {
  margin-left: auto;
  margin-top: calc(var(--u) * 4);
}

.menu-toggle { display: none; }        /* mobile only */


/* 07 HERO ================================================================== */
/* Full-screen sections: they fill the window below the sticky header, so the
   next section only appears after scrolling. Content is centred vertically. */
.hero,
.types {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));    /* fallback for older browsers */
  min-height: calc(100svh - var(--header-h));   /* svh: ignores the phone's address bar */
}

.hero {
  padding: calc(var(--u) * 64) 0;
}

/* Headline is laid out exactly like the artboard: three lines that overlap */
.hero__title {
  position: relative;
  width:  calc(var(--h, var(--u)) * 490);
  height: calc(var(--h, var(--u)) * 169);
  margin-left: calc(50% - var(--h, var(--u)) * 238.8);
  font-weight: normal;
  line-height: 1;
  white-space: nowrap;
}

.hero__title > span { position: absolute; }

.hero__good {
  left: 0;
  top: 0;
  font-family: var(--f-black);
  font-size: calc(var(--h, var(--u)) * 62.7);
  letter-spacing: .1em;
  color: transparent;
  -webkit-text-stroke: 1px var(--cream);     /* outlined, as in the design */
}

.hero__know {
  left: calc(var(--h, var(--u)) * 68.7);
  top:  calc(var(--h, var(--u)) * 52.7);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: calc(var(--h, var(--u)) * 60);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream);
}

.hero__flirt {
  left: calc(var(--h, var(--u)) * 302.4);
  top:  calc(var(--h, var(--u)) * 64.7);
  font-family: var(--f-flirt);
  font-size: calc(var(--h, var(--u)) * 106.6);
  color: var(--red);
}

.hero__row {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--u) * 163.5);         /* keeps the button where it was in the design */
  margin: calc(var(--u) * 83.5) 0 0 calc(50% - var(--u) * 300);
}

.hero__intro {
  width: calc(var(--u) * 228);          /* width tuned so the justified lines have even gaps */
  text-align: justify;
  text-align-last: left;                /* justified, last line aligned left */
  font-size: calc(var(--u) * 20);
  line-height: calc(var(--u) * 24);
}

.hero__row .btn { margin-top: calc(var(--u) * 26.5); }

/* 404 page (404.html) reuses the hero section, centred */
.not-found { align-items: center; text-align: center; gap: 48px; }
.not-found .contact__intro { color: var(--lilac); }   /* burgundy would vanish on the dark background */


/* 08 TYPE CARDS ("You're my type if") ===================================== */
.types {
  padding: calc(var(--u) * 64) 0;
}

.types__row {
  display: flex;
  justify-content: center;              /* cards centred as one row */
  align-items: center;
  gap: calc(var(--u) * 24);
  margin-top: calc(var(--u) * 72);
}

.type-card {
  --k: calc(var(--u) * .8);             /* 80% of the size in the artboard */
  position: relative;
  display: grid;                        /* front & back share one cell */
  place-items: center;
  flex: none;
  width:  calc(var(--k) * 361.5);
  height: calc(var(--k) * 248);
  text-align: center;
  cursor: default;
  outline-offset: calc(var(--k) * 10);
}

.type-card::before {                    /* the card shape */
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--cream);
  border-radius: calc(var(--k) * 9);
  transform: skewY(-2.877deg);
  transform-origin: left top;
  transition: background-color .35s ease, border-color .35s ease;
}

.type-card > p {
  position: relative;
  grid-area: 1 / 1;
  transition: opacity .35s ease;
}

.type-card__front {
  font-family: var(--f-black);
  font-size: calc(var(--k) * 37.67);
  line-height: 1.152;
  color: var(--cream);
  transform: translateY(calc(var(--k) * -6)) var(--text-tilt);
}

.type-card__back {                     /* same lettering as the front, in cream */
  font-family: var(--f-black);
  font-size: calc(var(--k) * 37.67);
  line-height: 1.152;
  color: var(--cream);
  opacity: 0;
  transform: translateY(calc(var(--k) * -6)) var(--text-tilt);
}

/* Hover state (mouse), keyboard focus, or tap (.is-active, set by main.js) */
.type-card.is-active::before,
.type-card:focus-visible::before { background: var(--ink); border-color: var(--cream); }
.type-card.is-active  .type-card__front,
.type-card:focus-visible .type-card__front { opacity: 0; }
.type-card.is-active  .type-card__back,
.type-card:focus-visible .type-card__back  { opacity: 1; }

@media (hover: hover) {
  .type-card:hover::before { background: var(--ink); border-color: var(--cream); }
  .type-card:hover .type-card__front { opacity: 0; }
  .type-card:hover .type-card__back  { opacity: 1; }
}


/* 09 SERVICES ============================================================== */
.services {
  padding: calc(var(--u) * 147.7) 0 calc(var(--u) * 117.6);
}

.services__grid {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--u) * 28.7);
  margin: calc(var(--u) * 65) 0 0 calc(50% - var(--u) * 347.7);
}

.services__col {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 25);
}

/* the left column sits lower, following the slope of the cards */
.services__col:first-child { margin-top: calc(var(--u) * 30.5); }

.service-card {
  --k: var(--u);
  /* text follows the slope of the card edges (skewY -4.297deg below) */
  --text-tilt: rotate(-4.297deg) skewX(-6.8deg) scaleY(.985);
  position: relative;
  display: grid;
  place-items: center;
  width:  calc(var(--k) * 338.2);
  height: calc(var(--k) * 232.3);
  text-align: center;
  color: var(--cream);
  outline-offset: calc(var(--k) * 10);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-gradient);
  border-radius: calc(var(--k) * 8.5);
  transform: skewY(-4.297deg);
  transform-origin: left top;
}

.service-card::after {                 /* hover: dark fill + cream outline, like the type cards */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  border: 1px solid var(--cream);
  border-radius: calc(var(--k) * 8.5);
  transform: skewY(-4.297deg);
  transform-origin: left top;
  opacity: 0;
  transition: opacity .35s ease;
}

.service-card > * {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  transform: translateY(calc(var(--k) * -12)) var(--text-tilt);
  transition: opacity .35s ease;
}

.service-card__front {
  font-family: var(--f-black);
  font-weight: 400;
  font-size: calc(var(--k) * 37.6);
  line-height: 1.05;
}

/* hover: "Read more" (the card is a link to the service page) */
.service-card__back {
  font-family: var(--f-black);
  font-size: calc(var(--k) * 37.6);   /* same size as the title, like the type cards */
  line-height: 1;
  opacity: 0;
}

.service-card:focus-visible::after { opacity: 1; }
.service-card:focus-visible .service-card__front { opacity: 0; }
.service-card:focus-visible .service-card__back  { opacity: 1; }

@media (hover: hover) {
  .service-card:hover::after { opacity: 1; }
  .service-card:hover .service-card__front { opacity: 0; }
  .service-card:hover .service-card__back  { opacity: 1; }
}


/* 10 ABOUT ================================================================= */
.about {
  padding: calc(var(--u) * 85.2) 0 calc(var(--u) * 87.7);
}

.about__row {
  display: flex;
  align-items: center;
  justify-content: center;              /* portrait + text centred as one group */
  gap: calc(var(--u) * 56);
  margin-top: calc(var(--u) * -2.4);
}

/* Portrait: photo masked by a tilted ellipse (same ellipse as the artboard) */
.about__portrait {
  flex: none;
  width: calc(var(--u) * 434.7);
}

.about__portrait img {
  width: 100%;
  height: auto;
  /* The tilted ellipse from the artboard, with a slightly feathered edge
     (about 4-5px). Softer edge: lower the .975 value (e.g. .9). */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 434.7 579.5'%3E%3CradialGradient id='f'%3E%3Cstop offset='.975' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cellipse cx='211.3' cy='294.6' rx='164.46' ry='210.76' fill='url(%23f)' transform='rotate(-19.22 211.3 294.6)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 434.7 579.5'%3E%3CradialGradient id='f'%3E%3Cstop offset='.975' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cellipse cx='211.3' cy='294.6' rx='164.46' ry='210.76' fill='url(%23f)' transform='rotate(-19.22 211.3 294.6)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.about__text {
  width: calc(var(--u) * 452);          /* was 539 in the artboard; tuned for even justified lines */
  font-size: calc(var(--u) * 22);
  line-height: calc(var(--u) * 26.4);
  letter-spacing: .05em;
  text-align: justify;
  text-align-last: left;
}

.about__text p + p { margin-top: calc(var(--u) * 26.4); }


/* 11 MARQUEE STRIPS ======================================================== */
/* A fixed band; the text scrolls through it endlessly.
   main.js clones .marquee__group so the loop is seamless.                    */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--speed, 40s) linear infinite;
}

.marquee__group {
  display: flex;
  flex: none;
}

.marquee .dot { font-family: var(--f-dot); }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Who's it for? — plum band, pink Stacktwin */
.audience {
  padding: calc(var(--u) * 87.4) 0 calc(var(--u) * 114.9);
}

.marquee--audience {
  height: calc(var(--u) * 63.9);
  margin-top: calc(var(--u) * 43.8);
  background: var(--plum);
  color: var(--pink);
  font-family: var(--f-black);
  font-size: calc(var(--u) * 37.46);
  line-height: calc(var(--u) * 63.9);
  letter-spacing: .05em;
  --speed: 45s;
}

.marquee--audience .marquee__group span { padding-top: calc(var(--u) * 4.4); }
.marquee--audience .dot { margin: 0 .28em; letter-spacing: 0; }
.marquee--audience .marquee__accent { color: var(--lime); }

/* Discretion — red band, cream Manrope */
.discretion {
  padding-top: calc(var(--u) * 87.4);
}

.marquee--discretion {
  height: calc(var(--u) * 51.2);
  margin-top: calc(var(--u) * 65.1);
  background: var(--red);
  color: var(--cream);
  font-size: calc(var(--u) * 22);
  line-height: calc(var(--u) * 51.2);
  letter-spacing: .05em;
  --speed: 35s;
}

.marquee--discretion .dot { margin: 0 .3em; }


/* 12 CONTACT =============================================================== */
.contact {
  padding: calc(var(--u) * 178.8) 0 calc(var(--u) * 111);
  text-align: center;
}

.contact__intro {
  margin-top: calc(var(--u) * 46);
  font-family: var(--f-black);
  font-size: calc(var(--u) * 35);
  line-height: 1;
  color: var(--plum);                   /* burgundy */
}

.contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 9.03);
  width: calc(var(--u) * 576.7);
  margin: calc(var(--u) * 67.8) auto 0;
}

.contact-form__field {
  display: block;
  width: 100%;
  height: calc(var(--u) * 56.57);
  padding: 0 calc(var(--u) * 24.3);
  border: 0;
  border-radius: calc(var(--u) * 4.47);
  background: var(--paper);
  color: var(--ink);
  font: 300 calc(var(--u) * 25) / 1.2 var(--f-body);
  letter-spacing: .05em;
  outline-offset: 2px;
}

.contact-form__field::placeholder { color: var(--grey); opacity: 1; }

.contact-form__field--message {
  height: calc(var(--u) * 192.47);
  padding-top: calc(var(--u) * 14);
  border-radius: calc(var(--u) * 8.25);
  resize: vertical;
}

/* CAPTCHA box (only visible when Cloudflare asks for a click) */
.contact-form__captcha:empty,
.contact-form__status:empty { display: none; }

/* Short feedback line under the button */
.contact-form__status {
  max-width: 100%;
  margin-top: calc(var(--u) * 10);
  font-size: calc(var(--u) * 15);
  line-height: 1.4;
  letter-spacing: .05em;
  color: var(--cream);
}

/* invalid fields after a submit attempt */
.contact-form.was-submitted .contact-form__field:invalid {
  box-shadow: inset 0 0 0 2px var(--plum);
}

/* Send button: red with a cream outline */
.btn--send {
  margin-top: calc(var(--u) * 35.2);   /* 44.2 in the design, minus the 9 px form gap */
}

.btn--send::before {
  box-shadow: inset 0 0 0 calc(var(--u) * 2) var(--cream);
}

.btn--send .btn__label--sent,
.btn--send .btn__label--busy { display: none; }

/* While sending */
.btn--send.is-busy { pointer-events: none; opacity: .8; }
.btn--send.is-busy .btn__label--idle { display: none; }
.btn--send.is-busy .btn__label--busy { display: inline; }

/* Sent state from the design: cream shape, red "thank you!" */
.btn--send.is-sent { pointer-events: none; color: var(--red); }
.btn--send.is-sent::before { background: var(--cream); }
.btn--send.is-sent .btn__label--idle { display: none; }
.btn--send.is-sent .btn__label--sent { display: inline; }


/* 13 FOOTER ================================================================ */
.site-footer {
  position: relative;
  display: grid;
  /* cherry, then icons + email next to it, legal text on the right */
  grid-template-columns: calc(var(--u) * 213) 1fr auto;
  align-items: center;
  min-height: calc(var(--u) * 193);
  padding: 0 calc(var(--u) * 62) 0 calc(var(--u) * 67.1);
  background: var(--ink);
}

.site-footer__logo {
  position: relative;
  z-index: 1;
  align-self: start;
  width: calc(var(--u) * 77.5);
  height: auto;
  /* the cherry's stem pokes out above the footer, into the section above */
  margin: calc(var(--u) * -37.1) 0 calc(var(--u) * 44);
}

.site-footer__contact,
.site-footer__legal {
  font-size: calc(var(--u) * 15);
  line-height: calc(var(--u) * 27.4);
  letter-spacing: .05em;
  margin-top: calc(var(--u) * 36);     /* level with the body of the cherry */
}

.socials {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 17);
  margin-bottom: calc(var(--u) * 6);
}

.socials svg {
  width: auto;
  height: calc(var(--u) * 18.4);
  fill: var(--cream);
  transition: fill .2s ease;
}

.socials a:hover svg,
.site-footer__mail:hover { fill: var(--red); color: var(--red); }

.site-footer__mail { transition: color .2s ease; }


/* 14 MOBILE (< 1024px) ===================================================== */
/* Not in the design files: own layout, keeping the same components.        */
@media (max-width: 1023px) {
  :root {
    --u: 1px;
    --g: .8px;
    --header-h: 72px;
    /* cards scale down on narrow phones so they never overflow */
    --card-k: min(1px, calc((100vw - 48px) / 362));
  }

  .section { padding-left: 20px; padding-right: 20px; }

  .section-title { font-size: 38px; }

  /* Header + slide-down menu */
  .site-header {
    padding: 0 20px;
    justify-content: space-between;
  }

  .site-header__logo img { width: 124px; margin-top: -6px; }

  .menu-toggle {
    display: block;
    padding: 8px 0 8px 16px;
    border: 0;
    background: none;
    color: var(--cream);
    font: 700 22px / 1 var(--f-display);
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .menu-toggle__close,
  .site-header.is-open .menu-toggle__open { display: none; }
  .site-header.is-open .menu-toggle__close { display: inline; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding: 40px 20px 56px;
    background: var(--ink);
    border-top: 1px solid rgb(242 229 189 / .12);
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility 0s .3s;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity .3s ease, transform .3s ease;
  }

  .site-nav__list {
    position: static;
    transform: none;
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  .site-nav__list a,
  .site-nav__toggle { font-size: 40px; }

  /* Services dropdown: opens in place, under "Services" */
  .has-menu { display: flex; flex-direction: column; align-items: center; }

  .site-nav__menu {
    position: static;
    display: none;
    gap: 14px;
    padding: 18px 0 4px;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .has-menu.is-open .site-nav__menu { display: flex; transform: none; }
  .site-nav__menu a { font-size: 24px; }

  .site-nav__cta { --k: 1px; margin: 0; }

  /* Hero */
  .hero { padding: 56px 20px; }

  .hero__title {
    --h: min(1px, calc((100vw - 40px) / 500));
    margin-left: auto;
    margin-right: auto;
  }

  .hero__row {
    flex-direction: column;
    align-items: center;
    gap: 36px;
    margin: 56px 0 0;
  }

  .hero__intro { width: auto; max-width: 302px; font-size: 18px; line-height: 1.35; }
  .hero__row .btn { margin-top: 0; }

  /* Type cards: stacked and centred */
  .types { padding: 64px 20px; }

  .types__row {
    flex-direction: column;
    gap: 36px;
    margin-top: 48px;
  }

  .type-card { --k: min(.85px, var(--card-k)); }

  /* Audience strip */
  .audience { padding: 72px 0 88px; }

  .marquee--audience {
    height: 50px;
    margin-top: 32px;
    font-size: 28px;
    line-height: 50px;
  }

  .marquee--audience .marquee__group span { padding-top: 3px; }

  /* Services: the same 2 x 2 layout as on a computer, scaled down to fit
     the screen (705 = two cards + the gap between them, in design pixels) */
  .services {
    --svc-k: min(.75px, calc((100vw - 40px) / 705));
    padding: 88px 20px 96px;
  }

  .services__grid {
    justify-content: center;
    gap: calc(var(--svc-k) * 28.7);
    margin: 48px 0 0;
  }

  .services__col { gap: calc(var(--svc-k) * 25); }
  .services__col:first-child { margin-top: calc(var(--svc-k) * 30.5); }
  .service-card { --k: var(--svc-k); }

  /* titles keep the same size as the "You're my type if" cards */
  .service-card__front,
  .service-card__back { font-size: calc(min(.85px, var(--card-k)) * 37.67); }

  /* About: portrait on top, text below (left-aligned reads better on a phone) */
  .about { padding: 72px 20px 88px; }

  .about__row {
    flex-direction: column;
    gap: 16px;
    margin: 24px 0 0;
  }

  .about__portrait { width: min(320px, 78vw); }

  .about__text {
    width: auto;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.55;
    letter-spacing: .03em;
  }

  .about__text p + p { margin-top: 1.1em; }

  /* Discretion strip */
  .discretion { padding: 72px 0 0; }

  .marquee--discretion {
    height: 44px;
    margin-top: 40px;
    font-size: 17px;
    line-height: 44px;
  }

  /* Contact */
  .contact { padding: 96px 20px 120px; }
  .contact__intro { margin-top: 28px; font-size: 27px; }

  .contact-form { width: 100%; max-width: 576px; margin-top: 40px; gap: 9px; }
  .contact-form__field { height: 52px; padding: 0 18px; font-size: 18px; }
  .contact-form__field--message { height: 180px; padding-top: 14px; }
  .btn--send { margin-top: 28px; }

  /* Footer: cherry on the left, icons, email and legal text centred */
  .site-footer {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 12px;
    padding: 0 20px;
  }

  .site-footer__logo {
    grid-column: 1;
    grid-row: 1 / -1;
    justify-self: start;
    width: 56px;
    margin: -27px 0 24px 4px;
  }
  .site-footer__contact,
  .site-footer__legal { grid-column: 2; text-align: center; margin-top: 0; }
  .site-footer__contact { grid-row: 2; }
  .socials { justify-content: center; gap: 18px; margin-bottom: 6px; }
  .socials svg { height: 18px; }
  .site-footer__contact,
  .site-footer__legal { font-size: 14px; line-height: 24px; }
  .site-footer__legal {
    grid-row: 3;
    margin-top: 10px;
    font-size: 12px;
    line-height: 20px;
  }
}


/* 16 SERVICE PAGES ======================================================== */
/* brand-audit.html, branding.html, rebranding.html, ongoing-design-support.html
   Built from Website-Services.svg (four 1440px artboards). Same sizing system
   as the homepage: calc(var(--u) * N), N = pixels in the artboard.          */

/* Background: dark at the top, fading to plum behind the title text and the
   steps, then the red "shall we?" band. (Darker than the design colours
   because the grain texture lightens them.)                                */
.svc-intro { --bg: linear-gradient(180deg, #030007 0, #030007 calc(var(--g) * 390), #1b000d calc(var(--g) * 700), #1b000d 100%); }
.svc-how   { --bg: linear-gradient(180deg, #1b000d 0, #1b000d 100%); }
.svc-cta   { --bg: linear-gradient(180deg, #ff2633 0, #ff2633 100%); }

/* 01 Title + What? -------------------------------------------------------- */
.svc-intro {
  padding: calc(var(--u) * 93) calc(var(--u) * 100) calc(var(--u) * 115.5) calc(var(--u) * 136.7);
}

.svc-title {
  position: relative;
  margin-left: calc(var(--u) * -8.5);   /* the blackletter has room on its left */
  font-family: var(--f-black);
  font-weight: 400;
  font-size: calc(var(--u) * 261.4);
  line-height: calc(var(--u) * 240);
  color: var(--red);
  white-space: nowrap;
}

.svc-title > span { display: block; }

/* "Ongoing" in script, overlapping "design support" (support page) */
.svc-title__script {
  position: relative;
  z-index: 0;
  margin-left: calc(var(--u) * 8.9);
  font-family: var(--f-flirt);
  font-size: calc(var(--u) * 261.4);
  line-height: calc(var(--u) * 147);
  color: var(--cream);
}

.svc-title__script + .svc-title__main { position: relative; z-index: 1; }

/* "WHAT?" and "HOW IT WORKS": Korolev Compressed Bold, 40px */
.svc-heading {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: calc(var(--u) * 40.2);
  line-height: 1;
  text-transform: uppercase;
  color: var(--cream);
}

.svc-heading--spaced { letter-spacing: .1em; }

/* "HOW IT WORKS" is centred (the extra padding balances the letter-spacing) */
.svc-how .svc-heading { text-align: center; padding-left: .1em; }

.svc-intro .svc-heading { margin-top: calc(var(--u) * 128.5); }

.svc-what {
  display: flex;
  gap: calc(var(--u) * 32);
  margin-top: calc(var(--u) * 6);
  font-size: calc(var(--u) * 20);
  line-height: calc(var(--u) * 24);
}

/* line breaks are copied from the design (<br>); on phones they are ignored */
.svc-what p:first-child { width: calc(var(--u) * 560); }
.svc-what p:last-child  { width: calc(var(--u) * 620); }

.svc-actions {
  display: flex;
  align-items: center;
  margin-top: calc(var(--u) * 54.5);
}


/* 02 How it works ---------------------------------------------------------- */
.svc-how {
  padding: 0 0 calc(var(--u) * 102.5);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;              /* 3 on the first row, the rest centred under it */
  gap: calc(var(--u) * 37) calc(var(--u) * 27);
  width: calc(var(--u) * 1068.6);       /* exactly three cards wide */
  margin: calc(var(--u) * 92) auto 0;     /* centred on the screen */
  padding: 0;
  list-style: none;
}

.step {
  --k: var(--u);
  position: relative;
  display: grid;
  place-items: center;                  /* content block sits in the middle of the card */
  flex: none;
  width:  calc(var(--k) * 338.2);
  height: calc(var(--k) * 222);
}

/* the cards in each row step up slightly, like in the design */
.step:nth-child(2) { transform: translateY(calc(var(--k) * -9.3)); }
.step:nth-child(3) { transform: translateY(calc(var(--k) * -23.9)); }
.step:nth-child(5) { transform: translateY(calc(var(--k) * -10.5)); }

.step::before {                          /* the card shape */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: calc(var(--k) * 8.5);
  transform: skewY(-4.297deg);
  transform-origin: left top;
}

.step__inner {
  position: relative;
  width: calc(var(--k) * 279);          /* text stays left-aligned inside this block */
  /* skewY: the lines climb with the card edges, but the letters stay upright.
     The card shape is skewed from its top-left corner, which lifts its middle
     by 12.7px; the content follows so it is centred in the visible card.     */
  transform: translateY(calc(var(--k) * -12.7)) skewY(-4.297deg);
}

.step__num {
  display: block;
  font-family: var(--f-black);
  font-size: calc(var(--k) * 52.6);
  line-height: calc(var(--k) * 44);
  color: var(--red);
}

.step__title {
  margin-top: calc(var(--k) * 2.5);     /* left edge lines up with the number and text */
  font-family: var(--f-black);
  font-weight: 400;
  font-size: calc(var(--k) * 30);
  line-height: 1;
  color: var(--cream);
}

.step__text {
  margin-top: calc(var(--k) * 5.5);
  font-size: calc(var(--k) * 15.2);
  line-height: calc(var(--k) * 20.5);
  color: var(--cream);
}

.step__text strong { font-weight: 600; }

/* 03 Shall we? ------------------------------------------------------------- */
.svc-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--u) * 108) 0 calc(var(--u) * 101);
}

.svc-cta__title {
  font-family: var(--f-flirt);
  font-size: calc(var(--u) * 106.6);
  line-height: 1;
  color: var(--ink);
}

.svc-cta .btn { margin-top: calc(var(--u) * 50); }

/* Phones and small tablets ------------------------------------------------- */
@media (max-width: 1023px) {
  .svc-intro { padding: 48px 20px 72px; }

  /* the big title shrinks to fit the screen width */
  .svc-title {
    --fit: 1;                           /* title width in "em", set per page below */
    margin-left: -4px;
    font-size: min(150px, calc((100vw - 36px) / var(--fit)));
    line-height: .92;
  }
  .svc-page--audit      .svc-title { --fit: 4.7; }
  .svc-page--branding   .svc-title { --fit: 3.55; }
  .svc-page--rebranding .svc-title { --fit: 4.4; }
  .svc-page--support    .svc-title { --fit: 3.05; white-space: normal; }
  .svc-page--support    .svc-title__main { line-height: .72; }   /* "design" and "support" closer together */

  .svc-title__script { margin-left: 4px; line-height: .6; font-size: 1em; }

  .svc-heading { font-size: 32px; }
  .svc-intro .svc-heading { margin-top: 44px; }

  .svc-what {
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
    font-size: 17px;
    line-height: 1.5;
  }

  .svc-what p:first-child,
  .svc-what p:last-child { width: auto; max-width: 560px; }
  .svc-what br { display: none; }

  .svc-actions { margin-top: 36px; }
  .svc-actions .btn { --k: 1px; }

  .svc-how { padding: 8px 20px 88px; }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: auto;
    margin: 48px 0 0;
  }

  .step { --k: var(--card-k); }
  .step:nth-child(n) { transform: none; }

  .svc-cta { padding: 72px 20px 80px; }
  .svc-cta__title { font-size: 76px; }
  .svc-cta .btn { --k: 1px; margin-top: 36px; }
}


/* 15 REDUCED MOTION ======================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation-duration: 160s; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
