/* Nomyum coming-soon landing page. Desktop follows the 1440 × 1024 Figma frame ("landing", 15:370);
   below 1100 px the cards move under the phone. Colors and shapes match the app (ink, 10 px corners). */

@font-face { font-family: "Rethink Sans"; font-weight: 400; font-display: swap; src: url("assets/fonts/rethink-sans-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; }
@font-face { font-family: "Rethink Sans"; font-weight: 400; font-display: swap; src: url("assets/fonts/rethink-sans-latin-ext-400.woff2") format("woff2"); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rethink Sans"; font-weight: 500; font-display: swap; src: url("assets/fonts/rethink-sans-latin-500.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: "Rethink Sans"; font-weight: 500; font-display: swap; src: url("assets/fonts/rethink-sans-latin-ext-500.woff2") format("woff2"); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rethink Sans"; font-weight: 600; font-display: swap; src: url("assets/fonts/rethink-sans-latin-600.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: "Rethink Sans"; font-weight: 600; font-display: swap; src: url("assets/fonts/rethink-sans-latin-ext-600.woff2") format("woff2"); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rethink Sans"; font-weight: 700; font-display: swap; src: url("assets/fonts/rethink-sans-latin-700.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: "Rethink Sans"; font-weight: 700; font-display: swap; src: url("assets/fonts/rethink-sans-latin-ext-700.woff2") format("woff2"); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #111111;
  --ink-secondary: #6e6e6e;
  /* Purple of the earlier logo (the app's brandPurple); the deeper one keeps small text readable. */
  --purple: #b89cf2;
  --purple-deep: #8563d6;
  --white: #ffffff;
  --radius: 10px;
  --card-radius: 30px;
  --lavender: #f0e9ff;
  --green: #e9f7dc;
  --peach: #ffefe3;
  --yellow: #fff4d1;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Rethink Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

/* Underlined links lose the underline on hover. */
.signup__note a:hover, .footer__link:hover { text-decoration: none; }

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

.page {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Hero: logo, headline, signup ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 45px 20px 0;
  text-align: center;
}

.logo { width: 112px; height: auto; }

.headline {
  max-width: 520px;
  margin: 30px 0 0;
  font-size: 57px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.signup {
  width: 100%;
  max-width: 480px;
  margin-top: 22px;
}

.signup__row {
  display: flex;
  gap: 8px;
}

.field {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: text;
  transition: border-color 0.15s ease;
}

.field__icon { flex: none; width: 20px; height: 20px; color: var(--ink); transition: color 0.15s ease; }

.field__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 500;
}

.field__input::placeholder { color: var(--ink-secondary); opacity: 1; }

.field:focus-within { box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08); }

.button {
  flex: none;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.button:hover { opacity: 0.88; }
.button:active { transform: scale(0.98); }
.button:disabled { opacity: 0.55; cursor: progress; }
.button:focus-visible, .field__input:focus-visible { outline: none; }
.button:focus-visible { box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.25); }

.signup__note {
  margin: 10px 0 0;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.signup__note a { color: var(--ink); font-weight: 500; }

/* Error state (Figma "Email Signup / State=Error") */
.signup.is-error .field { border-color: var(--purple); }
.signup.is-error .field__icon { color: var(--purple); }
.signup.is-error .signup__note { color: var(--purple-deep); }

/* Success state (Figma "Email Signup / State=Success") */
.confirmation {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  text-align: left;
}

.confirmation[hidden], .signup__row[hidden] { display: none; }

/* ---------- Showcase: hand with iPhone, app screens sliding inside, feature cards around ---------- */

.showcase {
  position: relative;
  /* Visible height of the showcase in the 1440 frame (the hand runs off the bottom). */
  aspect-ratio: 1440 / 693;
  margin-top: 4px;
  overflow: hidden;
}

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

/* Hand photo 644.8 × 931; on desktop as wide as in the 1440 frame, with the phone screen centred. */
.device {
  position: absolute;
  top: 3.75%;
  left: 35.66%;
  width: 44.78%;
  aspect-ratio: 644.8 / 931;
}

/* Pet canvases, in % of the hand photo so they scale with it. The pet fills the middle of its canvas
   (100 × 100 unit space), so the canvases are bigger than the characters. */
.pet {
  position: absolute;
  aspect-ratio: 1;
  pointer-events: none;
}

.pet--baby {
  left: 39.5%;
  top: -2.5%;
  width: 45%;
}

.pet--egg {
  left: -18.5%;
  top: 10%;
  width: 39.7%;
}

.device__photo {
  position: relative;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* Screen area of the photo (73.7, 14 / 265.3 × 563), cut to its rounded corners by the Figma mask. */
.device__screen {
  position: absolute;
  left: 11.43%;
  top: 1.5%;
  width: 41.14%;
  height: 60.48%;
  overflow: hidden;
  background: #fff;
  -webkit-mask: url("assets/screen-mask.png") center / 100% 100% no-repeat;
  mask: url("assets/screen-mask.png") center / 100% 100% no-repeat;
}

.device__track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  /* easeInOutQuart: a calm start, a quick glide and a soft landing. */
  transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.device__track.is-instant { transition: none; }

.device__slide {
  flex: 0 0 100%;
  height: 100%;
  /* The leaving screen sinks back a little while the next one glides in. */
  transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1), filter 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}

.device__slide.is-leaving {
  transform: scale(0.92);
  filter: brightness(0.9);
}

.device__track.is-instant .device__slide { transition: none; }

.device__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.features {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 18px;
  border-radius: var(--card-radius);
}

.feature--ai { background: var(--lavender); }
.feature--barcode { background: var(--green); }
.feature--pet { background: var(--peach); }
.feature--activity { background: var(--yellow); }

.feature__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
}

.feature__icon img { width: 22px; height: 22px; }

.feature__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: left;
}

.feature__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(17, 17, 17, 0.72);
  text-align: left;
}

/* Desktop: cards float around the phone, positioned as in the 1440 frame. */
@media (min-width: 1101px) {
  .feature {
    position: absolute;
    width: clamp(240px, 18.75vw, 270px);
  }
  .feature--ai { left: 11.8%; top: 0; }
  .feature--barcode { left: 71.25%; top: 8.2%; }
  .feature--pet { left: 8.8%; top: 45.3%; }
  .feature--activity { left: 68.9%; top: 48.9%; }

  .footer {
    position: absolute;
    right: 40px;
    bottom: 32px;
  }
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  font-size: 13px;
}

.footer span { color: var(--ink-secondary); }
.footer__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ---------- Popups (Contact, Cookies) in the feature card style ---------- */

.dialog {
  width: min(400px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: var(--card-radius);
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.dialog::backdrop {
  background: rgba(17, 17, 17, 0.35);
  backdrop-filter: blur(4px);
}

.dialog[open] { animation: dialog-in 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.dialog[open]::backdrop { animation: backdrop-in 0.35s ease-out; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes backdrop-in { from { opacity: 0; } }

.dialog__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 28px 24px 24px;
  border-radius: var(--card-radius);
  background: var(--white);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.18);
}

.dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f1f1;
  color: var(--ink);
  cursor: pointer;
}

.dialog__close:hover { background: #e6e6e6; }
.dialog__close:focus { outline: none; }
.dialog__close:focus-visible { box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.25); }

.dialog__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 24px;
}

.dialog__icon--lavender { background: var(--lavender); }
.dialog__icon--yellow { background: var(--yellow); }

.dialog__title {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dialog__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(17, 17, 17, 0.72);
}

.dialog__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  text-decoration: none;
}

/* ---------- Tablet and phone: phone mockup, then the cards in a grid ---------- */

@media (max-width: 1100px) {
  .showcase {
    aspect-ratio: auto;
    overflow: visible;
    margin-top: 20px;
  }

  /* The hand is wider than the phone: size it by --device and keep the phone screen centred. */
  .showcase__stage {
    /* Small enough that the pets on both sides of the phone stay on screen. */
    --device: min(108vw, 600px);
    position: relative;
    inset: auto;
    height: calc(var(--device) * 0.95);
    overflow: hidden;
  }

  .device {
    top: 0;
    left: calc(50% - var(--device) * 0.32);
    width: var(--device);
  }

  .features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 8px auto 0;
    padding: 0 20px;
  }

  .footer {
    padding: 40px 20px 32px;
  }
}

@media (max-width: 640px) {
  .hero { padding-top: 32px; }

  .logo { width: 100px; }

  .headline {
    margin-top: 20px;
    font-size: clamp(34px, 10.5vw, 46px);
  }

  .signup { margin-top: 24px; }

  .signup__row { flex-direction: column; }

  .button { width: 100%; }

  .features {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
