/* Wrigley Winds landing page: "Weather Vane simple v2".
   Fonts are self-hosted (OFL): Hanken Grotesk (variable, latin) and IBM Plex Mono 400 (latin, footer only). */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --mint: #E6F1F2;
  --ink: #0E3B22;
  --copy: #2F5240;
  --green: #23843F;
  --green-press: #1C7036;
  --leaf-faint: #2E9E4F59;
  --foot-copy: #D5E3DA;
  --foot-ring: #7BBF5A;
  --foot-rule: #FFFFFF26;

  /* Wrigley Clock backgrounds, from WrigleyClock/Color+Extension.swift */
  --sky-day: linear-gradient(#B4D2F0, #6491C8);   /* skyBlueGradient   (180,210,240) -> (100,145,200) */
  --sky-cloudy: linear-gradient(#969696, #787878); /* cloudyGradient    (150,150,150) -> (120,120,120) */
  --sky-rain: linear-gradient(#505A64, #3C4655);   /* rainyGradient     (80,90,100)   -> (60,70,85)    */
  --sky-night: linear-gradient(#191932, #0F0F1E);  /* nightSkyGradient  (25,25,50)    -> (15,15,30)    */

  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 20px;
  --cycle: 13.2s; /* 4 backgrounds x (2.5s hold + 0.8s crossfade) */
}

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

html {
  /* Overscroll shows mint above the page and footer green below it. */
  background: linear-gradient(var(--mint) 50%, var(--ink) 50%);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p,
figure,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-footer :focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.site-header {
  background: var(--mint);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
}

.brand__icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.brand__name {
  font-size: 19px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.x-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  transition: box-shadow .2s ease;
}

.x-pill__badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

.x-pill__badge svg {
  width: 14px;
  height: 14px;
}

.x-pill__handle {
  display: none;
}

.x-pill:hover {
  box-shadow: 0 8px 20px -10px #0E3B2280;
}

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

.hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  background: var(--mint);
}

.gusts {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.gust {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.gust--dash {
  stroke: var(--leaf-faint);
  stroke-width: 2;
  stroke-dasharray: 12 10;
}

.gusts--wide {
  display: none;
}

.gusts--top {
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 36px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 640px;
}

h1 {
  font-size: clamp(36px, 11.8vw, 60px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero__lede {
  max-width: 540px;
  color: var(--copy);
  font-size: 17px;
  line-height: 26px;
}

.hero__cta {
  width: 100%;
  padding-top: 2px;
}

.store-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
  transition: background-color .2s ease;
}

.store-button svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.store-button:hover {
  background: var(--green-press);
}

.hero__media {
  position: relative;
}

.gusts--phone {
  top: 0;
  left: calc(var(--gutter) * -1);
  width: calc(100% + var(--gutter) * 2);
  height: 260px;
}

.hero__phone {
  position: relative;
  display: flex;
  justify-content: center;
  max-width: 440px;
  margin-inline: auto;
  overflow: hidden;
  aspect-ratio: 350 / 490;
}

.hero__phone picture {
  flex: none;
  width: 85.715%; /* 300 / 350 */
}

.hero__phone img {
  width: 100%;
}

/* ---------- The Clock ---------- */

.clock {
  padding-block: 56px 64px;
  background: #fff;
}

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

.clock__copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}

h2 {
  font-size: 34px;
  line-height: 38px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.clock__lede {
  max-width: 430px;
  color: var(--copy);
  font-size: 17px;
  line-height: 26px;
}

.clock__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 56px 20px;
  border-radius: 32px;
  background: var(--mint);
  overflow: hidden;
  overflow: clip;
}

.gusts--panel-wide {
  display: none;
}

.gusts--panel-narrow {
  top: -8px; /* keeps the gust crossing the widget's upper third, as in the mobile design */
  left: 0;
  width: 100%;
  height: 200px;
}

.widget-wrap {
  position: relative;
}

.widget {
  position: relative;
  width: 184px;
  height: 184px;
  border-radius: 17%;
  overflow: hidden;
  isolation: isolate;
}

.widget__bg {
  position: absolute;
  inset: 0;
}

.widget__bg--day {
  background: var(--sky-day);
}

.widget__bg--cloudy {
  background: var(--sky-cloudy);
  opacity: 0;
}

.widget__bg--rain {
  background: var(--sky-rain);
  opacity: 0;
}

.widget__bg--night {
  background: var(--sky-night);
  opacity: 0;
}

/* Clock is 78.2% of the widget, measured from the real @3x promo render. */
.widget__face {
  position: absolute;
  top: 10.9%;
  left: 10.9%;
  width: 78.2%;
  height: 78.2%;
  overflow: visible;
}

/* Crossfade: clear day -> cloudy -> rain -> clear night -> clear day, ~2.5s hold, ~0.8s fade, forever.
   Without motion the widget holds its default Sunny / Clear background. */
@media (prefers-reduced-motion: no-preference) {
  .widget__bg--cloudy { animation: ww-cloudy var(--cycle) ease-in-out infinite; }
  .widget__bg--rain { animation: ww-rain var(--cycle) ease-in-out infinite; }
  .widget__bg--night { animation: ww-night var(--cycle) ease-in-out infinite; }
}

/* Layers stack day < cloudy < rain < night. Each new layer fades in over the last;
   cloudy and rain reset while night fully covers them, then night fades out to day. */
@keyframes ww-cloudy {
  0%, 18.94% { opacity: 0; }
  25%, 75% { opacity: 1; }
  76%, 100% { opacity: 0; }
}

@keyframes ww-rain {
  0%, 43.94% { opacity: 0; }
  50%, 75% { opacity: 1; }
  76%, 100% { opacity: 0; }
}

@keyframes ww-night {
  0%, 68.94% { opacity: 0; }
  75%, 93.94% { opacity: 1; }
  100% { opacity: 0; }
}


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

.site-footer {
  padding-block: 44px 36px;
  background: var(--ink);
  color: #fff;
}

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

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__name {
  font-size: 24px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer__built {
  color: var(--foot-copy);
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}

.footer__x {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  border-radius: 999px;
}

.footer__x-ring {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--foot-ring);
  border-radius: 50%;
}

.footer__x-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__x-handle {
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
}

.footer__x-url {
  color: var(--foot-copy);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
}

.footer__x:hover .footer__x-handle {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--foot-rule);
  color: var(--foot-copy);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
}

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

@media (min-width: 600px) {
  .clock__panel {
    max-width: 700px;
  }
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
  :root {
    --gutter: clamp(32px, 5.556vw, 80px);
  }

  .nav {
    padding-block: 24px;
  }

  .brand {
    gap: 12px;
  }

  .brand__icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }

  .brand__name {
    font-size: 22px;
    line-height: 28px;
  }

  .x-pill {
    padding: 10px 16px 10px 10px;
    background: #fff;
  }

  .x-pill__badge {
    width: 28px;
    height: 28px;
  }

  .x-pill__badge svg {
    width: 13px;
    height: 13px;
  }

  .x-pill__handle {
    display: inline;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
  }

  .gusts--top,
  .gusts--phone {
    display: none;
  }

  .gusts--wide {
    display: block;
    top: 0;
    left: 50%;
    width: min(2640px, 183.334vw);
    height: auto;
    aspect-ratio: 2640 / 760;
    transform: translateX(-50%);
  }

  .gust--dash {
    stroke-dasharray: 14 12;
  }

  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 720fr) minmax(0, 496fr);
    align-items: center;
    column-gap: 64px;
    padding-top: 40px;
    padding-bottom: 80px;
  }

  .hero__copy {
    gap: 28px;
    max-width: none;
  }

  h1 {
    font-size: clamp(56px, 5.834vw, 84px);
    line-height: 1.024;
  }

  .hero__lede {
    font-size: 22px;
    line-height: 32px;
  }

  .hero__cta {
    width: auto;
    padding-top: 4px;
  }

  .store-button {
    gap: 12px;
    width: auto;
    padding: 16px 28px 16px 22px;
    font-size: 19px;
    line-height: 24px;
  }

  .store-button svg {
    width: 22px;
    height: 22px;
  }

  .hero__phone {
    max-width: none;
    overflow: visible;
    aspect-ratio: auto;
  }

  .hero__phone picture {
    width: 84.476%; /* 419 / 496 */
  }

  .clock {
    padding-block: 104px;
  }

  .clock__inner {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
  }

  .clock__copy {
    flex: 0 1 480px;
    gap: 22px;
  }

  h2 {
    font-size: 52px;
    line-height: 56px;
  }

  .clock__lede {
    font-size: 19px;
    line-height: 29px;
  }

  .clock__panel {
    flex: 0 1 700px;
    max-width: none;
    padding: 96px 24px;
    border-radius: 40px;
  }

  .gusts--panel-narrow {
    display: none;
  }

  .gusts--panel-wide {
    display: block;
    top: 96px;
    left: 0;
    width: 100%;
    height: 300px;
  }

  .widget {
    width: 240px;
    height: 240px;
  }

  .site-footer {
    padding-block: 64px 44px;
  }

  .footer__top {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .footer__brand {
    gap: 10px;
  }

  .footer__name {
    font-size: 28px;
    line-height: 34px;
  }

  .footer__built {
    font-size: 16px;
  }

  .footer__x {
    align-self: auto;
  }

  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 22px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .x-pill,
  .store-button {
    transition: none;
  }
}
