/* FeelingFlexi homepage (2026-11-01): the app's look on the web.
   Cream and ink, Inter, plain text links, hairline separators, real
   photos. No pill buttons, no gradient bands. Colours come from the
   site tokens (--bg, --fg, --muted, --line), so dark follows them. */

.hm { display: block; }

.hp-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  box-sizing: border-box;
}

.hp-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hm h1,
.hm h2,
.hm h3 { margin: 0; color: var(--fg); text-wrap: balance; }

.hp-hero h1 {
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.hm h2 {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hm h3 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.hp-lede {
  max-width: 34em;
  margin: 22px 0 0;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--quiet);
}

/* Text links, never pills: a row of words with arrows. */
.hp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 30px;
}
.hp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
/* The underline sits on the words only, never under the gap or the arrow
   (Lorenzo, 2026-11-05). */
.hp-link span { display: inline-block; text-decoration: none; transition: transform 0.18s ease; }
.hp-link .hp-link-label { transition: none; }
.hp-link:hover span[aria-hidden] { transform: translateX(3px); }
.hp-link:hover .hp-link-label { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.hp-link-strong { font-weight: 650; }
.hp-link-strong .hp-link-label,
.hp-link-strong:hover .hp-link-label {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* "Want your business…" (Lorenzo, 2026-11-05): the app's tab-pill glass as a
   rectangle, under the hero's links. Never black. */
.hp-biz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(40, 40, 40, 0.12);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  backdrop-filter: blur(22px) saturate(1.45);
  box-shadow: 0 8px 24px rgba(24, 24, 24, 0.12);
  color: #111;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}
.hp-biz:hover { background: rgba(255, 255, 255, 0.72); }
.hp-biz:active { transform: scale(0.98); }
.hp-biz:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
[data-theme="dark"] .hp-biz {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(40, 44, 50, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  color: #f5f5f5;
}
[data-theme="dark"] .hp-biz:hover { background: rgba(60, 64, 72, 0.6); }
.hp-link:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

/* Hero: copy left, the hand with the app right. */
.hp-hero { padding: calc(max(12px, env(safe-area-inset-top)) + 64px + clamp(16px, 3vw, 40px)) 0 0; }
.hp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
}
.hp-hero-copy { min-width: 0; padding-bottom: clamp(24px, 6vw, 96px); }
.hp-hero-hand { min-width: 0; display: flex; justify-content: center; }
.hp-hero-hand img {
  display: block;
  width: 100%;
  max-width: 460px;
  max-height: min(640px, 78vh);
  object-fit: contain;
  object-position: bottom;
  height: auto;
}

.hp-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.hp-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 20px 0;
}
.hp-facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.hp-facts b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
.hp-facts span { font-size: 14px; color: var(--muted); }

/* Sections part with a hairline, like the app's settings lists. */
.hp-band {
  padding: clamp(56px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.hp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* How it works: numbered rows split by hairlines. */
.hp-rows { margin: 36px 0 0; padding: 0; list-style: none; }
.hp-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 200px;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.hp-row:last-child { border-bottom: 1px solid var(--line); }
.hp-num {
  align-self: start;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.hp-row-copy { min-width: 0; }
.hp-row-copy p {
  max-width: 32em;
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--quiet);
}

.hp-photo {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
}
.hp-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hp-row-photo { aspect-ratio: 4 / 3; max-width: 100%; }

/* See it in the app (2026-11-06): the App Store screenshots in one row that
   scrolls sideways and snaps, edge to edge inside the page's gutters, with
   part of the next screen showing. Plain scroll, no arrows. */
.hp-shots {
  display: flex;
  gap: 16px;
  /* Room above and below for the card shadow, which the scroller clips. */
  margin: 4px calc(-1 * max(20px, env(safe-area-inset-right))) -40px calc(-1 * max(20px, env(safe-area-inset-left)));
  padding: 36px max(20px, env(safe-area-inset-right)) 76px max(20px, env(safe-area-inset-left));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(20px, env(safe-area-inset-left));
  scrollbar-width: thin;
  list-style: none;
}
.hp-shots:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; border-radius: 4px; }
.hp-shot {
  flex: 0 0 auto;
  width: clamp(200px, 70vw, 300px);
  scroll-snap-align: start;
}
.hp-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1179 / 2556;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

/* A wide window: the row reaches past the column so the shadows are not cut
   at its edges, while the first screen still lines up with the heading. */
@media (min-width: 1240px) {
  .hp-shots { margin-left: -60px; margin-right: -60px; padding-left: 60px; padding-right: 60px; scroll-padding-inline: 60px; }
}

/* Photo grids with a caption under each. */
.hp-grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-grid li { min-width: 0; }
.hp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-grid .hp-photo { aspect-ratio: 4 / 5; max-width: 100%; }
.hp-cap {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.hp-note {
  max-width: 44em;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* Get the app: words left, the QR right. */
.hp-get-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
}
.hp-get .hp-lede { margin-top: 16px; }
.hp-qr {
  display: block;
  padding: 12px;
  border-radius: 16px;
  background: var(--qr-frame);
  line-height: 0;
}
.hp-qr img { display: block; width: 148px; height: 148px; }

@media (max-width: 860px) {
  .hp-hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hp-hero-copy { padding-bottom: 0; }
  .hp-hero-hand img { max-width: 380px; }
  .hp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-row { grid-template-columns: 40px minmax(0, 1fr) 140px; gap: 16px; }
}

@media (max-width: 560px) {
  .hp-wrap {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .hp-links { flex-direction: column; gap: 0; margin-top: 22px; }
  .hp-links .hp-link { border-bottom: 1px solid var(--line); justify-content: space-between; }
  .hp-links .hp-link:first-child { border-top: 1px solid var(--line); }
  .hp-hero-hand img { max-width: 300px; }
  .hp-facts li { padding: 16px 0; }
  .hp-facts li + li { padding-left: 12px; }
  .hp-facts b { font-size: 18px; }
  .hp-facts span { font-size: 12px; }
  .hp-row { grid-template-columns: 28px minmax(0, 1fr); }
  .hp-shots {
    gap: 12px;
    margin-left: calc(-1 * max(16px, env(safe-area-inset-left)));
    margin-right: calc(-1 * max(16px, env(safe-area-inset-right)));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    scroll-padding-inline: max(16px, env(safe-area-inset-left));
  }
  .hp-shot img { border-radius: 18px; }
  .hp-row-photo { grid-column: 2; }
  .hp-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hp-grid-3 .hp-photo { aspect-ratio: 16 / 10; }
  .hp-get-grid { grid-template-columns: minmax(0, 1fr); }
  .hp-qr { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-link span, .hp-biz { transition: none; }
}
