/* Nutrx — nutrx.ai static site
   Lean, dependency-free styles for the marketing + legal pages.
   Brand accent inherited from the app: pink #ff6b9d → gold #ffd93d. */

:root {
    --brand: #ff6b9d;
    --brand-dark: #ff5895;
    --brand-gold: #ffd93d;
    --bg: #ffffff;
    --bg-soft: #f8f9fb;
    --card: #ffffff;
    --text: #1d1d22;
    --text-soft: #5b5b66;
    --border: #ececf1;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(20, 20, 40, 0.06);
    --maxw: 760px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f0f14;
        --bg-soft: #15151c;
        --card: #17171f;
        --text: #f3f3f6;
        --text-soft: #a6a6b3;
        --border: #26262f;
        --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    }
}

/* Manual theme toggle (sets data-theme on <html>) overrides the system default */
:root[data-theme="dark"] {
    --bg: #0f0f14;
    --bg-soft: #15151c;
    --card: #17171f;
    --text: #f3f3f6;
    --text-soft: #a6a6b3;
    --border: #26262f;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(180%) blur(12px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}
.nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand .mark {
    width: 26px; height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-gold) 100%);
    display: inline-block;
}
.nav-links { display: flex; gap: 1.4rem; font-size: 0.95rem; }
.nav-links a { color: var(--text-soft); }
.nav-links a:hover { color: var(--brand); text-decoration: none; }

/* ---------- Hero (landing) ---------- */
.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(5rem + 50px) 1.5rem 1rem;
    text-align: center;
}
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .tagline { font-size: 1.25rem; color: var(--text-soft); margin: 0 auto 0.5rem; max-width: 36ch; }
.hero .tagline-sub { font-size: 1rem; color: var(--text-soft); opacity: 0.85; margin: 0 auto 2rem; max-width: 48ch; }
.cta-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 157, 0.35); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.features {
    max-width: var(--maxw);
    margin: 1rem auto 4rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow);
}
.feature h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

/* ---------- Legal / document pages ---------- */
.doc {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}
.doc h1 {
    font-size: 2.1rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.doc .updated { color: var(--text-soft); font-size: 0.9rem; margin: 0 0 2rem; }
.doc h2 {
    font-size: 1.35rem;
    margin: 2.6rem 0 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid color-mix(in srgb, var(--brand) 25%, transparent);
    color: var(--brand);
}
.doc h3 { font-size: 1.08rem; margin: 1.6rem 0 0.5rem; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc li { margin-bottom: 0.45rem; }
.doc strong { font-weight: 600; }
.doc .tldr {
    background: color-mix(in srgb, var(--brand) 7%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin: 0 0 2rem;
}
.doc .tldr p:last-child { margin-bottom: 0; }
.doc .callout {
    border-left: 4px solid var(--brand);
    background: color-mix(in srgb, var(--brand) 6%, var(--bg));
    padding: 0.9rem 1.2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.2rem 0;
}
.doc .disclaimer {
    margin-top: 2.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.92rem;
}

/* ---------- Plans / Nutrx+ comparison ---------- */
.plans { padding: 1.5rem 0 1.5rem; }
.plans-head { text-align: center; margin-bottom: 1.75rem; padding: 0 1.5rem; }
.plans-head h2 {
    font-size: clamp(1.7rem, 4.5vw, 2.2rem);
    margin: 0 0 0.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.plans-head h2 .brand-grad {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.plans-head p { color: var(--text-soft); margin: 0; }
.plus-lockup { position: relative; display: inline-block; vertical-align: middle; }
.plus-lockup-mark { height: 1.25em; width: auto; display: block; }
.plus-lockup-pill {
    position: absolute;
    top: 0.95em;
    right: -2.2em;
    font-size: 0.3em;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    color: var(--bg);
    background: var(--text);
    padding: 0.3em 0.62em;
    border-radius: 999px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.plus-pill {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    color: var(--bg);
    background: var(--text);
    padding: 0.3em 0.7em;
    border-radius: 999px;
    line-height: 1;
}
.compare { max-width: 600px; margin: 0 auto; padding: 0 1.5rem; }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #eceef2;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.95rem;
}
/* Light-mode tint above only; keep the dark-mode table on the card color */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .compare-table { background: var(--card); }
}
:root[data-theme="dark"] .compare-table { background: var(--card); }
.compare-table th, .compare-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.compare-table thead th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}
.compare-table th:not(:first-child),
.compare-table td:not(:first-child) { text-align: center; width: 5.5rem; }
.compare-table td:nth-child(2) { color: var(--text-soft); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tfoot td {
    text-align: center;
    color: var(--text-soft);
    font-style: italic;
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
    border-bottom: none;
    background: color-mix(in srgb, var(--brand) 4%, transparent);
}
.compare-table .col-plus { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.compare-table thead .col-plus { color: var(--brand); }
.compare-table thead .col-free { color: #7cb518; }
.compare-table td.col-plus { color: var(--brand); font-weight: 600; }
.plans-note { text-align: center; color: var(--text-soft); font-size: 0.85rem; margin: 1rem 0 0; }
@media (max-width: 480px) {
    .compare-table { font-size: 0.85rem; }
    .compare-table th, .compare-table td { padding: 0.7rem 0.55rem; }
    .compare-table th:not(:first-child), .compare-table td:not(:first-child) { width: 4.5rem; }
}

/* ---------- Call to action ---------- */
.cta-section {
    background: linear-gradient(135deg, #f495b5 0%, var(--brand) 100%);
    color: #fff;
    text-align: center;
    padding: 5rem 0;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.cta-content h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin: 0 0 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.cta-content p { font-size: 1.2rem; opacity: 0.92; max-width: 720px; margin: 0 auto 2.5rem; }
.cta-buttons { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.download-btn { display: inline-block; text-decoration: none; transition: all 0.3s ease; }
.download-btn img {
    height: 56px; width: auto; border-radius: 12px;
    transition: all 0.3s ease; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}
.download-btn:hover img { transform: translateY(-3px); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25)); }

/* ---------- Footer (always dark, both light & dark themes) ---------- */
.site-footer {
    background: #15151c;
    border-top: 1px solid #26262f;
    padding: 2.5rem 5%;
    text-align: center;
}
.footer-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    color: #a6a6b3;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-content p { margin: 0; }
.footer-content p a { color: var(--brand); font-weight: 600; text-decoration: none; }
.footer-content p a:hover { color: var(--brand-dark); text-decoration: underline; }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.social-links a[aria-label="Instagram"] { display: none; }
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: #17171f; border: 1px solid #26262f; border-radius: 10px;
    color: #a6a6b3; text-decoration: none; transition: all 0.3s ease;
}
.social-icon:hover {
    color: var(--brand); border-color: var(--brand);
    transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.social-icon svg { width: 20px; height: 20px; fill: currentColor; }
.legal-links { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; gap: 1.5rem; }
.legal-links a { color: #a6a6b3; text-decoration: none; font-size: 0.9rem; transition: all 0.3s ease; }
.legal-links a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 768px) {
    .footer-content { gap: 0.75rem; }
    .legal-links { position: static; transform: none; justify-content: center; }
}

@media (max-width: 600px) {
    .nav-links { gap: 1rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Animated logo orb (hero) ---------- */
.nutrx-logo-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    animation: float 6s ease-in-out infinite;
}
.nutrx-logo-border {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg,
        hsl(313, 86%, 72%),
        hsl(270, 80%, 60%),
        hsl(180, 84%, 74%),
        hsl(223, 80%, 60%),
        hsl(60, 80%, 60%),
        hsl(120, 80%, 60%),
        hsl(300, 80%, 60%),
        hsl(300, 61%, 68%),
        hsl(350, 88%, 48%)
    );
    background-size: 400% 400%;
    border-radius: 20px;
    padding: 3px;
    animation: gradientShift 4s ease infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.4)) drop-shadow(0 0 40px rgba(255, 107, 157, 0.2));
}
.nutrx-logo-inner {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.nutrx-logo-svg { width: 60px; height: 60px; display: block; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .nutrx-logo-container, .nutrx-logo-border { animation: none; }
}

/* ---------- Showcase marquee (app screenshots) ---------- */
.section-header { text-align: center; margin-bottom: 3rem; padding: 0 1.5rem; }
.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin: 0 0 0.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-header p { font-size: 1.1rem; color: var(--text-soft); max-width: 600px; margin: 0 auto; }

.about-section { background: var(--bg); padding: 0.5rem 0 0.5rem; overflow: hidden; }

@keyframes rfm-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.rfm-marquee-container { position: relative; width: 100%; overflow: hidden; padding: 2rem 0; }
.rfm-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(to right,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 80%, transparent) 10%,
        transparent 25%,
        transparent 75%,
        color-mix(in srgb, var(--bg) 80%, transparent) 90%,
        var(--bg) 100%);
}
.rfm-marquee {
    display: flex;
    width: max-content;
    min-width: 100%;
    animation: rfm-marquee 60s linear infinite;
}
.rfm-marquee:hover { animation-play-state: paused; }
.rfm-initial-child-container { display: flex; }
.rfm-child { margin-right: 2rem; flex-shrink: 0; }
.rfm-child img {
    height: 520px;
    width: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.3));
    user-select: none;
    pointer-events: none;
}
.rfm-child:hover img { transform: scale(1.05); }

@media (max-width: 768px) {
    .rfm-child { margin-right: 1rem; }
    .rfm-child img { height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
    .rfm-marquee { animation: none; }
}
