@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  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: "Inter";
  src: url("fonts/inter-latin-ext-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto-latin-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  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: "Roboto";
  src: url("fonts/roboto-latin-ext-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f7ecec;
  --ink: #391e0a;
  --accent: #ff7974;
  --hill: #ecd0cf;
  --btn-text: #f5f5f5;
  --btn-border: #2c2c2c;

  /* 1 design pixel of the 321x570 mobile frame */
  --u: clamp(1px, min(100vw / 321, 100vh / 570), 1.6px);
}

@supports (height: 100dvh) {
  :root {
    --u: clamp(1px, min(100vw / 321, 100dvh / 570), 1.6px);
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--btn-text);
  font-size: 16px;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: clip;
  background: var(--bg) url("assets/paws-mobile.svg") center top / 100% auto no-repeat;
}

/* Logo */

/* Spare height splits in thirds: above the logo, above the dog, below the buttons */
.top {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1 0 auto;
  align-items: flex-end;
  justify-content: center;
  padding-top: calc(37 * var(--u));
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4.32 * var(--u));
  width: calc(81 * var(--u));
  border-radius: 8px;
}

.brand__mark {
  width: calc(62.75 * var(--u));
  height: calc(62.57 * var(--u));
}

.brand__word {
  width: calc(81 * var(--u));
  height: calc(50.11 * var(--u));
}

/* Copy */

.hero {
  position: relative;
  display: flex;
  flex: 2 0 auto;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(17 * var(--u)) 0 calc(16 * var(--u));
}

.hero__title {
  margin: 0;
  font-weight: 600;
  font-size: calc(24 * var(--u));
  line-height: calc(23.4 * var(--u));
  letter-spacing: -0.02em;
}

.hero__line {
  display: block;
}

.hero__line--accent {
  color: var(--accent);
}

.hero__lead {
  margin: calc(8.2 * var(--u)) 0 0;
  font-family: "Roboto", "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: calc(12 * var(--u));
  line-height: calc(16 * var(--u));
  letter-spacing: calc(0.4 * var(--u));
}

/* Dog, hill, buttons */

.hero__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: auto 0;
  padding-bottom: calc(43 * var(--u) + env(safe-area-inset-bottom, 0px));
}

.hero__stage::before {
  content: "";
  position: absolute;
  top: calc(194 * var(--u));
  left: 50%;
  width: calc(809 * var(--u));
  height: calc(303 * var(--u));
  transform: translateX(calc(-50% + 1 * var(--u)));
  border-radius: 50%;
  background: var(--hill);
}

.hero__dog {
  position: relative;
  z-index: 2;
  width: calc(198 * var(--u));
  height: calc(198 * var(--u));
  pointer-events: none;
}

.hero__cta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: calc(9 * var(--u));
  width: calc(240 * var(--u));
  margin-top: calc(-18 * var(--u));
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(40 * var(--u));
  padding: 0 calc(12 * var(--u));
  border: 1px solid var(--btn-border);
  border-radius: calc(8 * var(--u));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: calc(16 * var(--u));
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--btn-text);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
}

.btn--primary:hover {
  background: #4d2a10;
}

.btn--secondary:hover {
  background: rgb(57 30 10 / 0.06);
}

.btn:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Desktop: 1920x1080 frame. Height sets the scale. Width limits it only when the 620px copy column gets tight. */

@media (min-width: 768px) {
  :root {
    --u: clamp(0.5px, min(100vw / 1200, 100vh / 1080), 1.5px);
  }

  @supports (height: 100dvh) {
    :root {
      --u: clamp(0.5px, min(100vw / 1200, 100dvh / 1080), 1.5px);
    }
  }

  .page {
    background-image: url("assets/paws-desktop.svg");
    background-size: max(100%, calc(1920 * var(--u))) auto;
  }

  .top {
    flex: none;
    align-items: flex-start;
    height: calc(82.5 * var(--u));
    padding: calc(15 * var(--u)) calc(1 * var(--u)) 0 0;
    background: var(--ink);
  }

  .brand {
    flex-direction: row;
    align-items: flex-start;
    gap: calc(9.5 * var(--u));
    width: auto;
  }

  .brand__mark {
    width: calc(50.22 * var(--u));
    height: calc(46.93 * var(--u));
  }

  .brand__word {
    width: calc(235.37 * var(--u));
    height: calc(39.35 * var(--u));
    margin-top: calc(6.5 * var(--u));
  }

  /* Figma centers the hero column at x=973 of 1920 and the header logo at 959.5 */
  .hero {
    flex: 1 0 auto;
    padding-left: calc(26 * var(--u));
  }

  .hero__copy {
    margin-top: auto;
    padding: calc(96 * var(--u)) 0 calc(43.5 * var(--u));
  }

  .hero__title {
    font-weight: 700;
    font-size: calc(72 * var(--u));
    line-height: 1;
    letter-spacing: -0.03em;
  }

  .hero__lead {
    order: -1;
    margin: 0 0 calc(12.6 * var(--u));
    font-weight: 400;
    font-size: calc(27 * var(--u));
    line-height: calc(32.4 * var(--u));
    letter-spacing: calc(0.4 * var(--u));
  }

  /* Buttons never shrink below 40px, so the bottom space gives back the difference */
  .hero__stage {
    padding-bottom: calc(133 * var(--u) - max(0px, 40px - 40 * var(--u)) + env(safe-area-inset-bottom, 0px));
  }

  .hero__stage::before {
    top: calc(427 * var(--u));
    width: max(calc(2813 * var(--u)), 146.5vw);
    height: auto;
    aspect-ratio: 2813 / 1053;
    transform: translateX(calc(-50% + 0.5 * var(--u)));
  }

  .hero__dog {
    width: calc(472 * var(--u));
    height: calc(472 * var(--u));
  }

  .hero__cta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: max(16px, calc(16 * var(--u)));
    width: auto;
    margin-top: calc(24 * var(--u));
  }

  .btn {
    width: max(240px, calc(240 * var(--u)));
    height: max(40px, calc(40 * var(--u)));
    padding: 0 max(12px, calc(12 * var(--u)));
    border-radius: max(8px, calc(8 * var(--u)));
    font-size: max(16px, calc(16 * var(--u)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
