/* ===== ByteDiet – styles ===== */

:root {
  --green-light: #5cd97e;
  --green: #2fbd5f;
  --green-dark: #20934a;
  --green-tint: #f2faf4;
  --green-pale: #e2f3e7;
  --text: #16241b;
  --text-muted: #5b6b61;
  --white: #ffffff;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(32, 147, 74, 0.15);
  --gradient: linear-gradient(135deg, var(--green-light) 0%, var(--green) 50%, var(--green-dark) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow { max-width: 760px; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--green-pale);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover { color: var(--green-dark); }

.nav-links .nav-cta {
  background: var(--green);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 999px;
}

.nav-links .nav-cta:hover {
  background: var(--green-dark);
  color: var(--white);
}

/* ===== Hero ===== */
.hero {
  background: var(--gradient);
  color: var(--white);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 40px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  margin-bottom: 28px;
  border: 3px solid rgba(255, 255, 255, 0.6);
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.lead {
  font-size: 1.15rem;
  max-width: 34em;
  opacity: 0.95;
  margin-bottom: 32px;
}

.platform-note {
  margin-top: 14px;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Beta badge + primary button */
.beta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.btn-primary {
  display: inline-block;
  background: var(--white);
  color: var(--green-dark);
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 560px;
}

/* Progress ring echoing the app icon */
.ring {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: conic-gradient(rgba(255, 255, 255, 0.95) 0 72%, rgba(255, 255, 255, 0.25) 72% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 26px), #000 calc(100% - 25px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 26px), #000 calc(100% - 25px));
  opacity: 0.55;
}

/* ===== App mockups ===== */
/* The mockup PNGs are 1920x1440 with the phone centered on a transparent canvas.
   This box shows the middle 880x1320 (the phone and its full shadow), and fades
   out the bottom where the shadow is cut off by the canvas edge. */
.mockup {
  width: 100%;
  aspect-ratio: 880 / 1320;
  object-fit: cover;
  object-position: center bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
}

.mockup-hero {
  position: relative;
  width: 440px;
}

/* ===== Sections ===== */
.section { padding: 96px 0; }

.section-tint { background: var(--green-tint); }

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 56px;
}

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  background: var(--white);
  border: 1px solid var(--green-pale);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient);
  color: var(--white);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.feature-icon svg { width: 26px; height: 26px; }

.feature h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature p { color: var(--text-muted); }

/* ===== Screenshot gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-items: center;
}

.shot {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.shot figcaption {
  margin-top: 8px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq {
  border: 1px solid var(--green-pale);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 16px;
  background: var(--white);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq[open] summary::after { transform: rotate(45deg); }

.faq p a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq p {
  margin-top: 12px;
  color: var(--text-muted);
}

/* ===== CTA ===== */
.cta {
  background: var(--gradient);
  color: var(--white);
  text-align: center;
  padding: 96px 0;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  border: 3px solid rgba(255, 255, 255, 0.6);
}

.cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.cta p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 30px;
}

.cta .cta-note {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 14px 0 0;
}

/* ===== Footer ===== */
.footer {
  background: #0f1a13;
  color: #b9c7be;
  padding: 40px 0 28px;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a:hover { color: var(--green-light); }

.legal {
  margin-top: 24px;
  font-size: 0.78rem;
  color: #7d8c83;
}

/* ===== Legal pages ===== */
.page-header {
  background: var(--gradient);
  color: var(--white);
  padding: 64px 0 56px;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.page-header p { opacity: 0.9; }

.legal-content { padding: 56px 0 88px; }

.legal-content h2 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

.legal-content p,
.legal-content ul {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.legal-content ul { padding-left: 22px; }

.legal-content li { margin-bottom: 6px; }

.legal-content strong { color: var(--text); }

.legal-content a {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== 404 page ===== */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.not-found {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--gradient);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.not-found-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Progress ring echoing the app icon */
.not-found-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 32px;
  background:
    radial-gradient(farthest-side, var(--white) calc(100% - 22px), transparent calc(100% - 21px)),
    conic-gradient(var(--green) 0 72%, var(--green-pale) 72% 100%);
  border: 8px solid var(--white);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.not-found-ring span {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green-dark);
}

.not-found h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.not-found p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .gallery { gap: 20px; }
}

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .hero-icon { margin-left: auto; margin-right: auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-visual { min-height: 480px; }
  .ring { width: 400px; height: 400px; }
}

@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .section, .cta { padding: 72px 0; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; row-gap: 40px; }
  .mockup-hero { width: 340px; }
  .ring { width: 320px; height: 320px; }
  .hero-visual { min-height: 420px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
