/* ============================================
   PEPTERA RESEARCH — Design System
   Apple-inspired dark aesthetic
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --color-bg: #000000;
    --color-bg-alt: #0a0a0a;
    --color-surface: #111111;
    --color-surface-hover: #1a1a1a;
    --color-border: #222222;
    --color-text: #f5f5f7;
    --color-text-muted: #86868b;
    --color-accent: #2997ff;
    --color-accent-hover: #0077ed;
    --color-accent-green: #30d158;
    --color-white: #ffffff;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Font Sizes — fluid */
    --text-display: clamp(2.5rem, 5vw, 5rem);
    --text-h1: clamp(2rem, 4vw, 3.5rem);
    --text-h2: clamp(1.5rem, 3vw, 2.5rem);
    --text-h3: clamp(1.25rem, 2vw, 1.75rem);
    --text-body: clamp(1rem, 1.1vw, 1.125rem);
    --text-small: 0.875rem;
    --text-eyebrow: 0.75rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* Layout */
    --container-max: 1200px;
    --container-pad: var(--space-lg);
    --header-height: 72px;

    /* Transitions */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s var(--ease-out);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 980px;
}

/* --- Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-accent-hover);
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-white);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

.text-display {
    font-size: var(--text-display);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.text-eyebrow {
    font-size: var(--text-eyebrow);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
}

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

.text-mono {
    font-family: var(--font-mono);
    font-size: var(--text-small);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.section {
    padding: var(--space-2xl) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-3xl) 0;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: var(--space-4xl) 0;
    }
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Header / Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: transparent;
    transition: background var(--transition-base), border-color var(--transition-base), backdrop-filter var(--transition-base);
    border-bottom: 1px solid transparent;
}

.header--scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--color-border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo img {
    height: 28px;
    width: auto;
}

.nav {
    display: none;
    align-items: center;
    gap: var(--space-lg);
}

.nav a {
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-base);
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--color-white);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.97);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav a {
    font-size: var(--text-h2);
    font-weight: 600;
    color: var(--color-text);
    transition: color var(--transition-base);
}

.mobile-nav a:hover {
    color: var(--color-accent);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(41, 151, 255, 0.3);
}

.btn--secondary {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn--secondary:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--color-accent);
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--text-body);
}

.btn--ghost::after {
    content: '→';
    transition: transform var(--transition-base);
}

.btn--ghost:hover::after {
    transform: translateX(4px);
}

.btn--ghost:hover {
    color: var(--color-accent-hover);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero--short {
    min-height: 40vh;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero__content .text-eyebrow {
    margin-bottom: var(--space-sm);
}

.hero__content h1 {
    margin-bottom: var(--space-md);
}

.hero__content p {
    font-size: clamp(1.05rem, 1.2vw, 1.25rem);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 550px;
    line-height: 1.8;
}

.hero__disclaimer {
    font-size: var(--text-eyebrow);
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    opacity: 0.6;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* --- Cards --- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    background: var(--color-surface-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(41, 151, 255, 0.15);
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    padding: 0;
}

.product-card__image {
    position: relative;
    padding: var(--space-xl) var(--space-lg);
    background: linear-gradient(135deg, var(--color-surface) 0%, #0d0d0d 100%);
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    transition: transform 0.5s var(--ease-out);
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__eyebrow {
    font-size: var(--text-eyebrow);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.product-card__title {
    font-size: var(--text-h3);
    margin-bottom: var(--space-xs);
}

.product-card__meta {
    font-family: var(--font-mono);
    font-size: var(--text-small);
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.product-card__purity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-accent-green);
    margin-bottom: var(--space-md);
}

.product-card__purity::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-green);
}

.product-card__actions {
    margin-top: auto;
}

/* --- Purity Badge (detail page) --- */
.purity-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(48, 209, 88, 0.1);
    border: 1px solid rgba(48, 209, 88, 0.2);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-accent-green);
}

.purity-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent-green);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Spec Table --- */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid var(--color-border);
}

.spec-table td {
    padding: var(--space-sm) 0;
    vertical-align: top;
}

.spec-table td:first-child {
    font-weight: 600;
    color: var(--color-text-muted);
    width: 40%;
    font-size: var(--text-small);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-table td:last-child {
    font-family: var(--font-mono);
    color: var(--color-white);
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

.section-header .text-eyebrow {
    margin-bottom: var(--space-sm);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--color-text-muted);
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    line-height: 1.8;
}

/* --- Quality Features --- */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.feature-item__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(41, 151, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.feature-item__icon svg {
    width: 12px;
    height: 12px;
    fill: var(--color-accent);
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--color-border);
}

.cta-section h2 {
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: var(--color-text-muted);
    max-width: 550px;
    margin: 0 auto var(--space-lg);
    line-height: 1.8;
}

/* --- Contact Form --- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: var(--text-body);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    accent-color: var(--color-accent);
}

.form-check label {
    font-size: var(--text-small);
    color: var(--color-text-muted);
    line-height: 1.6;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* --- Blog / Insights Cards --- */
.insight-card {
    overflow: hidden;
    padding: 0;
}

.insight-card__image {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, #0d0d0d 100%);
}

.insight-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.insight-card:hover .insight-card__image img {
    transform: scale(1.05);
}

.insight-card__body {
    padding: var(--space-lg);
}

.insight-card__date {
    font-size: var(--text-eyebrow);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.insight-card__title {
    font-size: var(--text-h3);
    margin-bottom: var(--space-sm);
    transition: color var(--transition-base);
}

.insight-card:hover .insight-card__title {
    color: var(--color-accent);
}

.insight-card__excerpt {
    color: var(--color-text-muted);
    font-size: var(--text-small);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

/* --- Footer --- */
.footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer__brand p {
    color: var(--color-text-muted);
    font-size: var(--text-small);
    line-height: 1.7;
    margin-top: var(--space-sm);
    max-width: 350px;
}

.footer__brand img {
    height: 24px;
}

.footer__heading {
    font-size: var(--text-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer__links a {
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

.footer__links a:hover {
    color: var(--color-white);
}

.footer__disclaimer {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
}

.footer__disclaimer p {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    opacity: 0.6;
    max-width: 700px;
}

.footer__bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-sm);
    margin-top: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.footer__copyright {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.5;
}

.footer__legal {
    display: flex;
    gap: var(--space-sm);
}

.footer__legal a {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.5;
}

.footer__legal a:hover {
    opacity: 1;
    color: var(--color-white);
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Split layout */
.split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

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

/* About page commitment list */
.commitment-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.commitment-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--color-text);
    line-height: 1.7;
}

.commitment-list li::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 8px;
}

/* Related products section */
.related-products {
    border-top: 1px solid var(--color-border);
}
