/* ===== Brand ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}
/* Master logo is a landscape lockup (~1.91:1 — gauge + wordmark + tagline
   baked in). We size by HEIGHT so all placements share a consistent visual
   weight, but the ceilings are tuned so the tagline stays legible on small
   viewports while the wordmark never overpowers surrounding UI. */
.brand__img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
@media (min-width: 720px) {
  .brand__img { height: 46px; }
}

/* Nav — must fit inside the 4.5rem (72px) sticky header with breathing room
   and cannot dominate on mobile where horizontal space is scarce. */
.brand__img--nav {
  height: 48px;
}
@media (min-width: 720px) {
  .brand__img--nav { height: 54px; }
}
@media (min-width: 1024px) {
  .brand__img--nav { height: 60px; }
}

/* Stacked — used in the hero of /founding and in every footer. Bigger than
   the nav so it reads as a "sign-off" lockup, but capped so the wide aspect
   ratio doesn't blow out the container width on tablet. */
.brand__img--stacked {
  height: 88px;
}
@media (min-width: 720px) {
  .brand__img--stacked { height: 108px; }
}
@media (min-width: 1024px) {
  .brand__img--stacked { height: 120px; }
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--t-base),
    border-color var(--t-base),
    box-shadow var(--t-base),
    transform var(--t-fast),
    color var(--t-base);
}
.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
.btn__icon { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  box-shadow: 0 4px 24px rgba(225, 6, 0, 0.30);
}
.btn--primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  box-shadow: 0 8px 32px rgba(225, 6, 0, 0.55);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
}

.btn--sm { padding: 0.625rem 1.125rem; font-size: var(--fs-xs); }
.btn--lg {
  padding: 1.05rem 2rem;
  font-size: var(--fs-base);
  letter-spacing: 0.06em;
}
.btn--full { width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn__loading { display: none; }
.btn.is-loading .btn__text,
.btn.is-loading .btn__icon { display: none; }
.btn.is-loading .btn__loading { display: inline; }

/* ===== Forms ===== */
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--s-4);
}
.form-row {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 540px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-field label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-label-optional {
  margin-left: 0.35rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--text-faint);
}
.form-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.4;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg);
  color: var(--white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--t-base), background var(--t-base);
}
.form-field input::placeholder { color: var(--text-dim); }
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--red);
  background: var(--bg-card);
}
.form-field input.is-invalid,
.form-field select.is-invalid { border-color: var(--red); }

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-error {
  display: block;
  font-size: var(--fs-xs);
  color: var(--red-hover);
  margin-top: 0.375rem;
  min-height: 1rem;
}

.form-status {
  margin-top: var(--s-4);
  padding: 0.875rem 1rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  text-align: center;
}
.form-status--success {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.form-status--error {
  background: var(--red-soft);
  color: var(--red-hover);
  border: 1px solid var(--red);
}

/* ===== Phone mock ===== */
.phone {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  background: #050505;
  border: 8px solid #1a1a1a;
  border-radius: 44px;
  padding: 0;
  box-shadow:
    inset 0 0 0 2px #2a2a2a,
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px var(--border);
}
.phone::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 44px;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--red-soft), transparent 70%);
  z-index: -1;
}
.phone__notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone__screen {
  background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
  border-radius: 36px;
  padding: 2.75rem 1.25rem 1.5rem;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.phone__brand {
  display: flex;
  justify-content: center;
  padding-block: 0.5rem;
}
.phone__logo { width: 44px; height: 44px; }

/* ===== Gauge ===== */
.gauge {
  position: relative;
  padding: 1rem 0 0.5rem;
}
.gauge__svg { width: 100%; max-width: 240px; margin-inline: auto; }
.gauge__readout {
  text-align: center;
  margin-top: -1.5rem;
}
.gauge__value {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  font-variation-settings: 'wdth' 100, 'opsz' 96;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.04em;
}
.gauge__status {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4ade80;
}

/* Meal card inside phone */
.meal-card {
  background: linear-gradient(180deg, #141414, #0e0e0e);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.875rem;
}
.meal-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.625rem;
}
.meal-card__tag {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--red);
  background: var(--red-soft);
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
}
.meal-card__score {
  font-family: var(--font-display);
  color: #4ade80;
  font-size: 0.875rem;
  font-weight: 800;
}
.meal-card__body {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.meal-card__img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
}
.meal-card__img svg { width: 100%; height: 100%; }
.meal-card__info h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}
.meal-card__info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.meal-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.meal-card__stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.meal-card__stats strong {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  font-variation-settings: 'wdth' 100, 'opsz' 18;
  letter-spacing: -0.02em;
  color: var(--white);
}
.meal-card__stats span {
  font-size: 0.625rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
