/* FeelBite marketing site
 * Light-only, professional, simple, modern.
 * Mirrors the iOS app's UI_STYLEGUIDE.md: coral-to-amber accent, warm off-white,
 * system fonts, generous spacing. No third-party imports.
 */

:root {
  /* Brand */
  --accent:          #E8765A;
  --accent-deep:     #C95A3F;
  --accent-amber:    #F4A261;
  --accent-soft:     rgba(232, 118, 90, 0.06);
  --accent-stroke:   rgba(232, 118, 90, 0.18);

  /* Surface — warm light */
  --bg-page:         #FBF8F4;
  --bg-surface:      #FFFFFF;
  --bg-tint:         rgba(232, 118, 90, 0.035);

  /* Ink — high contrast on warm bg */
  --ink-1:           #1F1A15;
  --ink-2:           #4D4640;
  --ink-3:           #847B71;
  --ink-on-accent:   #FFFFFF;

  /* Borders */
  --border:          #ECE5DC;
  --border-strong:   #DDD3C5;

  /* Shadow */
  --shadow-1:        0 1px 1px rgba(31, 26, 21, 0.03);
  --shadow-2:        0 1px 3px rgba(31, 26, 21, 0.05), 0 8px 24px rgba(31, 26, 21, 0.05);

  /* Spacing — 4px grid */
  --xs: 4px;
  --sm: 8px;
  --md: 12px;
  --lg: 20px;
  --xl: 32px;
  --xxl: 56px;
  --xxxl: 96px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Typography — system stack only */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Segoe UI", Helvetica, Arial, "Noto Sans", system-ui, sans-serif;

  /* Container */
  --content-max: 680px;
  --header-max: 1100px;
  --hero-max: 1080px;
}

/* ---------- Reset ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

p {
  margin: 0 0 var(--lg);
}

h1, h2, h3 {
  margin: 0 0 var(--md);
  color: var(--ink-1);
  letter-spacing: -0.015em;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  font-size: 1.4rem;
  margin-top: 0;
  font-weight: 600;
}

h3 {
  font-size: 1.1rem;
}

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-tint);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--lg);
}

.wrap-wide {
  max-width: var(--hero-max);
  margin-inline: auto;
  padding-inline: var(--lg);
}

.wrap-header {
  max-width: var(--header-max);
  margin-inline: auto;
  padding-inline: var(--lg);
}

main {
  padding-block: var(--xxl) var(--xxxl);
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding-block: var(--xl) var(--xxl); }
}

/* ---------- Site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 244, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--lg);
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-1);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.005em;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent-deep);
}

.brand__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--lg);
  margin-inline-start: auto;
}

.site-nav a {
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-deep);
  text-decoration: none;
}

@media (max-width: 480px) {
  .site-header__inner { gap: var(--md); }
  .site-nav { gap: var(--md); }
  .site-nav a:not(.lang-switcher *) { font-size: 0.88rem; }
}

/* ---------- Language switcher (top-right, no JS required) ---------- */

.lang-switcher {
  position: relative;
}

.lang-switcher > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--ink-1);
  font-size: 0.88rem;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
  box-shadow: var(--shadow-1);
  transition: border-color 140ms ease, background 140ms ease;
}

.lang-switcher > summary::-webkit-details-marker {
  display: none;
}

.lang-switcher > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.55;
  transition: transform 180ms ease;
}

.lang-switcher[open] > summary::after {
  transform: translateY(1px) rotate(225deg);
}

.lang-switcher > summary:hover {
  border-color: var(--border-strong);
  background: var(--bg-tint);
}

.lang-switcher__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.lang-switcher__panel a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-1);
  font-size: 0.92rem;
  line-height: 1.3;
  white-space: nowrap;
}

.lang-switcher__panel a:hover,
.lang-switcher__panel a:focus-visible {
  background: var(--bg-tint);
  color: var(--accent-deep);
  text-decoration: none;
}

.lang-switcher__panel a[aria-current="true"] {
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
}

@media (max-width: 540px) {
  .lang-switcher__panel {
    grid-template-columns: 1fr;
    min-width: 220px;
    right: -6px;
  }
}

/* ---------- Hero (two-column on desktop, stacked on mobile) ---------- */

.wrap-hero {
  max-width: var(--hero-max);
  margin-inline: auto;
  padding-inline: var(--lg);
}

.hero {
  padding-block: var(--xxl) var(--xl);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--xxl);
  align-items: center;
}

@media (min-width: 880px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--xxxl);
    padding-block: var(--xl);
  }
}

.hero__text {
  text-align: center;
}

@media (min-width: 880px) {
  .hero__text {
    text-align: start;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--accent-stroke);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  margin-bottom: var(--lg);
}

.hero__icon-row {
  display: inline-flex;
  align-items: center;
  gap: var(--md);
  margin-bottom: var(--lg);
}

.hero__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: var(--shadow-2);
}

.hero__title {
  margin: 0 0 var(--sm);
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink-1);
}

.hero__subtitle {
  margin: 0 0 var(--lg);
  font-size: 1.18rem;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.hero__lede {
  margin: 0 0 var(--xl);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-1);
  max-width: 42ch;
  margin-inline: auto;
}

@media (min-width: 880px) {
  .hero__lede {
    margin-inline: 0;
  }
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--md);
  align-items: center;
  justify-content: center;
}

@media (min-width: 880px) {
  .hero__cta-row {
    justify-content: flex-start;
  }
}

.app-store-cta {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  transition: transform 140ms ease, opacity 140ms ease;
  text-decoration: none;
  position: relative;
}

.app-store-cta img {
  height: 60px;
  width: auto;
  display: block;
}

.app-store-cta:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.app-store-cta__note {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--accent-deep);
  color: white;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  border: 2px solid var(--bg-page);
}

.hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 12px;
  transition: color 140ms ease;
}

.hero__cta-secondary:hover {
  color: var(--accent-deep);
  text-decoration: none;
}

.hero__cta-secondary::after {
  content: "→";
  transition: transform 140ms ease;
}

.hero__cta-secondary:hover::after {
  transform: translateX(2px);
}

/* Phone mockup */

.phone-mockup {
  position: relative;
  margin-inline: auto;
  width: min(280px, 70vw);
  aspect-ratio: 600 / 1304;
  border-radius: 38px;
  background: #1F1A15;
  padding: 10px;
  box-shadow:
    0 1px 1px rgba(31, 26, 21, 0.04),
    0 12px 32px rgba(31, 26, 21, 0.12),
    0 28px 64px rgba(31, 26, 21, 0.10);
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #1F1A15;
  border-radius: 13px;
  z-index: 2;
  pointer-events: none;
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  display: block;
  object-fit: cover;
  background: var(--bg-page);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 880px) {
  .phone-mockup {
    width: min(320px, 100%);
  }
  .hero__visual {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .phone-mockup {
    width: min(240px, 70vw);
  }
}

[dir="rtl"] .phone-mockup {
  /* keep centered behavior */
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--xxl);
  border-top: 1px solid var(--border);
}

.section--no-border {
  border-top: none;
}

.section__eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}

.section h2 {
  font-size: 1.6rem;
  letter-spacing: -0.018em;
  margin-bottom: var(--md);
}

.section__lead {
  color: var(--ink-2);
  font-size: 1.02rem;
  margin-bottom: var(--lg);
  max-width: 56ch;
}

/* Feature list — refined dot bullets (used in non-features list) */

.bullets {
  display: grid;
  gap: var(--md);
  margin: var(--md) 0 0;
}

@media (min-width: 720px) {
  .bullets--2col { grid-template-columns: 1fr 1fr; gap: var(--md) var(--xl); }
}

.bullets li {
  position: relative;
  padding-inline-start: 22px;
  line-height: 1.55;
  color: var(--ink-1);
}

.bullets li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.bullets strong {
  font-weight: 600;
  color: var(--ink-1);
}

.bullets em {
  font-style: normal;
  color: var(--ink-2);
}

/* Feature cards — used for "What FeelBite does" on the index page.
 * Auto-fit grid: 1 column on phone, 2 on tablet, 3 on desktop. */

.feature-grid {
  display: grid;
  gap: var(--lg);
  grid-template-columns: 1fr;
  margin-top: var(--lg);
}

@media (min-width: 600px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .feature-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--lg);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent-stroke);
}

.feature-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-amber));
  color: var(--ink-on-accent);
  font-size: 1.1rem;
  margin-bottom: var(--md);
  box-shadow: 0 2px 8px rgba(232, 118, 90, 0.25);
}

.feature-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink-1);
}

.feature-card__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Section eyebrow + heading on the index page */

.section__eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 12px;
}

.section__heading {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--md);
}

.section__lede {
  color: var(--ink-2);
  font-size: 1.05rem;
  margin-bottom: var(--xl);
  max-width: 60ch;
}

/* "What does NOT" pill row — horizontal pills on wide screens */

.non-feature-row {
  display: grid;
  gap: var(--md);
  grid-template-columns: 1fr;
  margin-top: var(--lg);
}

@media (min-width: 600px) {
  .non-feature-row { grid-template-columns: 1fr 1fr; }
}

.non-feature-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.96rem;
  color: var(--ink-1);
  line-height: 1.45;
}

.non-feature-pill::before {
  content: "✕";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Install / TestFlight callout — visually distinct */

.install-callout {
  margin-top: var(--xl);
  padding: var(--xl);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-tint) 100%);
  border: 1px solid var(--accent-stroke);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: var(--lg);
  flex-wrap: wrap;
}

.install-callout__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-amber));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(232, 118, 90, 0.35);
}

.install-callout__text {
  flex: 1;
  min-width: 220px;
}

.install-callout__heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink-1);
}

.install-callout__body {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Privacy / static-content list */

.plain-prose p {
  margin-bottom: var(--lg);
  color: var(--ink-1);
}

.plain-prose h2 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-top: var(--xl);
  margin-bottom: var(--sm);
  color: var(--ink-1);
}

.plain-prose h2:first-of-type {
  margin-top: 0;
}

.plain-prose strong {
  font-weight: 600;
  color: var(--ink-1);
}

.callout {
  background: var(--bg-tint);
  border: 1px solid var(--accent-stroke);
  border-radius: var(--r-md);
  padding: var(--lg);
  margin-block: var(--xl);
}

.callout p:last-child { margin-bottom: 0; }

.note {
  font-size: 0.9rem;
  color: var(--ink-3);
  font-style: italic;
}

.disclaimer {
  font-size: 0.88rem;
  color: var(--ink-3);
  border-top: 1px solid var(--border);
  margin-top: var(--xxl);
  padding-top: var(--lg);
  font-style: italic;
  line-height: 1.55;
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}

.lede-paragraph {
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--ink-1);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--xl);
  color: var(--ink-3);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--md) var(--lg);
}

.site-footer__inner > p {
  margin: 0;
  margin-inline-end: auto;
}

.site-footer a {
  color: var(--ink-2);
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--accent-deep);
}

@media (max-width: 480px) {
  .site-footer__inner { font-size: 0.85rem; }
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  inset-block-start: 0;
  padding: 10px 16px;
  background: var(--ink-1);
  color: var(--ink-on-accent);
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 100;
  font-weight: 500;
}

.skip-link:focus {
  inset-inline-start: 0;
  text-decoration: none;
}

/* ---------- RTL overrides ---------- */
/* Most layout uses logical properties; this block is for residual physical refs. */

[dir="rtl"] .lang-switcher__panel {
  right: auto;
  left: 0;
}

@media (max-width: 540px) {
  [dir="rtl"] .lang-switcher__panel {
    left: -6px;
    right: auto;
  }
}

/* ---------- Reduced motion / print ---------- */

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

@media print {
  .site-header,
  .site-footer,
  .lang-switcher {
    display: none;
  }
  body { background: white; }
}
