/* ==========================================================================
   Arida Agency — "Good Things are Coming" landing page
   Desktop values are measured from the 1440 x 1681 reference screenshot.
   ========================================================================== */

:root {
  /* Colours sampled from the reference */
  --color-bg: #f7f3eb;
  --color-ink: #000;
  --color-button: #e2ceae;
  --color-rule: #e7d7bd;

  /* Type: closest Google Fonts matches to the reference (substitutes, not confirmed originals) */
  --font-serif: "Libre Baskerville", Baskerville, "Baskerville Old Face", "Times New Roman", serif;
  --font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-footer: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Collage unit: 1px at >= 1440px viewports, scales down proportionally, floors at 0.55px */
  --u: clamp(0.55px, calc(100vw / 1440), 1px);

  /* Marquee */
  --marquee-duration: 45s;   /* one full sequence (1520 collage units) per 45s, ~34px/s on desktop */
  --sequence-width: 1520;    /* collage units; next sequence starts here */
  --sequence-height: 683;    /* collage units; tallest extent of the composition */
  --track-offset: -22;       /* collage units; aligns frame 0 with the reference crop */
}

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

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

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

/* --------------------------------------------------------------------------
   Header / logo
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: center;
  padding-top: 47px;
}

.site-logo {
  width: 197px;
  height: 43px;
}

/* --------------------------------------------------------------------------
   Hero heading
   -------------------------------------------------------------------------- */

.hero {
  padding-inline: 20px;
}

.hero__title {
  margin: 76px auto 0;
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.032em;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Signup form (Klaviyo embed form R5HWhg)
   Klaviyo injects its own markup and inline styles into .klaviyo-form-R5HWhg,
   so these overrides use !important. They target Klaviyo's stable hooks
   (data-testid attributes and klaviyo-* classes), never its generated
   "go1234567890" class names, which change between releases.
   -------------------------------------------------------------------------- */

.signup-embed {
  width: 100%;
  max-width: 652px;
  min-height: 153px; /* reserves the form's height so the page doesn't jump while Klaviyo loads */
  margin: 52px auto 0;
}

.signup-embed form.klaviyo-form {
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* Klaviyo's step container becomes the two-column grid */
.signup-embed form.klaviyo-form > div {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 21px 14px;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.signup-embed [data-testid="form-row"] {
  display: block !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.signup-embed [data-testid="form-component"] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* The button and any text block (such as the success message) span both columns */
.signup-embed [data-testid="form-row"]:has(.klaviyo-form-button),
.signup-embed [data-testid="form-row"]:has(.klaviyo-form-richtext) {
  grid-column: 1 / -1;
}

/* Hide the form's own heading on the signup step; the page's h1 already says it.
   The success message (shown after submitting, when there is no email field) stays visible. */
.signup-embed form.klaviyo-form:has(.klaviyo-emailinput) [data-testid="form-row"]:has(.klaviyo-form-richtext) {
  
}



.signup-embed .klaviyo-form-richtext,
.signup-embed .klaviyo-form-richtext * {
  color: var(--color-ink) !important;
  font-family: "Libre Baskerville", Baskerville, "Baskerville Old Face", "Times New Roman", serif;
  letter-spacing: -0.03em !important;
  text-align: center !important;
}

/* Fields */
.signup-embed .klaviyo-textinput,
.signup-embed .klaviyo-emailinput {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.signup-embed .klaviyo-textinput input,
.signup-embed .klaviyo-emailinput input {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 37px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 1px solid var(--color-ink) !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--color-ink) !important;
  font-family: var(--font-sans) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  letter-spacing: -0.03em !important;
  text-align: center !important;
}

/* Klaviyo's labels sit inside the pill and act as the visible placeholder text.
   They stay in the markup, so screen readers still announce each field's name. */
.signup-embed .klaviyo-textinput label,
.signup-embed .klaviyo-emailinput label {
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  z-index: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 37px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  overflow: hidden;
  color: var(--color-ink) !important;
  font-family: var(--font-sans) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: -0.03em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
  pointer-events: none;
}

/* Hide the label text while typing or once the field has a value */
.signup-embed .klaviyo-textinput:has(input:focus) label,
.signup-embed .klaviyo-textinput:has(input:not(:placeholder-shown)) label,
.signup-embed .klaviyo-emailinput:has(input:focus) label,
.signup-embed .klaviyo-emailinput:has(input:not(:placeholder-shown)) label {
  opacity: 0 !important;
}

/* Klaviyo's inline error messages */
.signup-embed .klaviyo-textinput > div,
.signup-embed .klaviyo-emailinput > div,
.signup-embed .klaviyo-textinput > div *,
.signup-embed .klaviyo-emailinput > div * {
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  text-align: center !important;
}

/* Button */
.signup-embed .klaviyo-form-button {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 37px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 1px solid var(--color-ink) !important;
  border-radius: 999px !important;
  background: var(--color-button) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  color: var(--color-ink) !important;
  font-family: var(--font-sans) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  letter-spacing: -0.03em !important;
  text-transform: uppercase !important;
  cursor: pointer;
}

/* Keyboard focus */
.signup-embed .klaviyo-textinput input:focus-visible,
.signup-embed .klaviyo-emailinput input:focus-visible,
.signup-embed .klaviyo-form-button:focus-visible {
  outline: 2px solid var(--color-ink) !important;
  outline-offset: 3px !important;
}

/* --------------------------------------------------------------------------
   Scrolling collage (marquee)
   -------------------------------------------------------------------------- */

.showcase {
  margin-top: clamp(56px, 8.889vw, 128px); /* 128px at 1440 */
}

.media-marquee {
  position: relative;
  overflow: hidden;
  height: calc(var(--sequence-height) * var(--u));
}

.media-track {
  display: flex;
  width: max-content;
  margin-left: calc(var(--track-offset) * var(--u));
}

.media-sequence {
  position: relative;
  flex: none;
  width: calc(var(--sequence-width) * var(--u));
  height: calc(var(--sequence-height) * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
  /* Every sequence moves by exactly its own width, so the loop distance
     always equals one sequence regardless of how many copies exist. */
  animation: marquee var(--marquee-duration) linear infinite;
  will-change: transform;
}

.media-item {
  position: absolute;
  top: calc(var(--y) * var(--u));
  left: calc(var(--x) * var(--u));
  z-index: var(--z, 0);
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  margin: 0;
  overflow: hidden;
}

.media-item > img,
.media-item > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}

/* Collage videos are decorative: no context menu, tap-to-play or picture-in-picture. */
.media-item > video {
  background-color: var(--color-rule); /* shows only until the poster loads */
  pointer-events: none;
}

/* iOS draws a large play button over a video when it blocks playback (Low Power Mode);
   the poster frame is the intended fallback, so hide it. Kept as separate rules because
   browsers that don't know one of these selectors would drop a combined rule. */
.media-item > video::-webkit-media-controls {
  display: none !important;
}

.media-item > video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about {
  padding-inline: 20px;
  margin-top: clamp(56px, 6.146vw, 88.5px); /* 88.5px at 1440 */
}

.about__copy {
  max-width: 680px; /* reference text block measures ~650px; the .lb breaks set the exact wrap */
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.545; /* 26.25px line pitch in the reference */
  letter-spacing: -0.035em;
  text-align: center;
}

.about__copy strong {
  font-weight: 600;
}

.about__copy .lb {
  display: none;
}

@media (min-width: 760px) {
  .about__copy .lb {
    display: inline;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin: 98px clamp(20px, 3.542vw, 51px) 0; /* rule inset 51px each side at 1440 */
  border-top: 1px solid var(--color-rule);
  padding: 25px 0 21px;
  text-align: center;
}

.site-footer__copy {
  margin: 0;
  font-family: var(--font-footer);
  font-size: 13px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Thank-you page (thank-you.html)
   Matches the previous thank-you design: bold serif heading, two lines of
   Helvetica copy, then the same scrolling collage as the home page.
   -------------------------------------------------------------------------- */

.site-logo-link {
  display: block;
  border-radius: 4px;
}

.site-logo-link:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 6px;
}

.thanks {
  padding-inline: 20px;
  text-align: center;
}

.thanks__title {
  margin: 51px auto 0;
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.034em;
}

.thanks__copy {
  margin-top: 30px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.thanks__copy p {
  margin: 0;
}

.thanks__copy p + p {
  margin-top: 8px;
}

.page-thanks .showcase {
  margin-top: clamp(56px, 8.542vw, 123px); /* 123px at 1440 */
}

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero__title {
    margin-top: 64px;
  }

  .about {
    margin-top: 64px;
  }

  .site-footer {
    margin-top: 80px;
  }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
  .site-header {
    padding-top: 32px;
  }

  .hero {
    padding-inline: 16px;
  }

  .hero__title {
    margin-top: 48px;
    font-size: clamp(22px, 7vw, 48px); /* keeps the two-line break intact down to 320px */
  }

  .signup-embed {
    min-height: 268px;
    margin-top: 36px;
  }

  .signup-embed form.klaviyo-form > div {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* comfortable touch targets */
  .signup-embed .klaviyo-textinput input,
  .signup-embed .klaviyo-emailinput input,
  .signup-embed .klaviyo-form-button,
  .signup-embed .klaviyo-textinput label,
  .signup-embed .klaviyo-emailinput label {
    height: 44px !important;
  }

  .about {
    padding-inline: 16px;
    margin-top: 48px;
  }

  .about__copy {
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.02em;
    text-wrap: pretty;
  }

  .site-footer {
    margin-top: 64px;
    padding-top: 20px;
  }

  .thanks {
    padding-inline: 16px;
  }

  .thanks__title {
    margin-top: 40px;
    font-size: clamp(22px, 6.8vw, 48px); /* keeps each line on one line down to 320px */
  }

  .thanks__copy {
    margin-top: 24px;
  }

  .thanks__copy p {
    text-wrap: balance;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: no autoplaying marquee; the original sequence becomes a
   manually scrollable strip and the decorative duplicates are removed.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .media-marquee {
    height: auto; /* room for the scrollbar */
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--color-button) transparent;
  }

  .media-marquee:focus-visible {
    outline: 2px solid var(--color-ink);
    outline-offset: -2px;
  }

  .media-track {
    margin-left: 0;
  }

  .media-sequence {
    animation: none;
    will-change: auto;
  }

  .media-sequence[aria-hidden="true"] {
    display: none;
  }
}
