/* ============================================================
   Hair Scan AI — Global Stylesheet
   Apple-inspired minimal light design
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent:        #0071E3;
    --accent-hover:  #0077ED;
    --text-primary:  #1D1D1F;
    --text-secondary:#6E6E73;
    --text-tertiary: #AEAEB2;
    --bg:            #FFFFFF;
    --bg-alt:        #F5F5F7;
    --bg-card:       #FFFFFF;
    --border:        #D2D2D7;
    --border-light:  #E8E8ED;
    --shadow-sm:     0 1px 4px rgba(0,0,0,.06);
    --shadow-md:     0 4px 20px rgba(0,0,0,.08);
    --shadow-lg:     0 12px 40px rgba(0,0,0,.10);
    --radius-sm:     10px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --radius-xl:     28px;
    --nav-height:    64px;
    --font:          -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > footer {
    margin-top: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ============================================================
   UTILITY
   ============================================================ */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--nav-height);
    background: rgba(255,255,255,.85);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -.3px;
}

.nav-brand:hover { text-decoration: none; }

.nav-brand .logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: .93rem;
    font-weight: 500;
    letter-spacing: -.1px;
    transition: color .2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
    text-decoration: none;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all .3s;
}

/* ============================================================
   HERO — INDEX
   ============================================================ */
.hero {
    background: #FFFFFF;
    padding: 100px 0 80px;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(0,113,227,.08);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.04em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 36px;
}

.store-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: var(--text-primary);
    color: #fff;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background .2s, transform .2s, box-shadow .2s;
    min-width: 160px;
}

.store-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: #fff;
}

.store-btn svg { flex-shrink: 0; }

.store-btn .btn-text { display: flex; flex-direction: column; }
.store-btn .btn-small { font-size: .68rem; opacity: .8; line-height: 1; }
.store-btn .btn-large { font-size: .95rem; font-weight: 700; line-height: 1.3; }

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    animation: gentleFloat 7s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}

.phone-mockup img {
    position: relative;
    z-index: 1;
    max-height: 560px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.15));
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
    padding: 96px 0;
    background: var(--bg);
}

.section-label {
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 56px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    z-index: 0;
}

.step-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.step-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-item p {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
    padding: 96px 0;
    background: var(--bg-alt);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: box-shadow .25s, transform .25s;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(0,113,227,.1), rgba(0,113,227,.05));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -.02em;
}

.feature-card p {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================
   RESULTS PREVIEW
   ============================================================ */
.results-section {
    padding: 96px 0;
    background: var(--bg);
}

.results-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.results-text .section-label,
.results-text .section-title,
.results-text .section-subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.metric-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.metric-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.metric-item strong {
    font-size: .95rem;
    color: var(--text-primary);
    min-width: 120px;
}

.metric-item span {
    font-size: .85rem;
    color: var(--text-secondary);
}

.results-visual {
    display: flex;
    justify-content: center;
}

.mock-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 340px;
}

.mock-result-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

.mock-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E0E7FF, #C7D2FE);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.mock-card-title { font-weight: 600; font-size: .95rem; }
.mock-card-sub { font-size: .78rem; color: var(--text-tertiary); }

.mock-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.mock-metric-row:last-of-type { border-bottom: none; }

.mock-metric-row .label {
    font-size: .82rem;
    color: var(--text-secondary);
}

.mock-metric-row .value {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mock-score-bar {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.mock-score-bar .bar-label {
    font-size: .82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.bar-track {
    height: 6px;
    background: var(--bg-alt);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent), #34AADC);
    transition: width .6s ease;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-section {
    padding: 80px 0;
    background: var(--text-primary);
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.04em;
    margin-bottom: 14px;
}

.cta-section p {
    color: rgba(255,255,255,.65);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

.cta-section .store-buttons { justify-content: center; }

.cta-section .store-btn {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}

.cta-section .store-btn:hover {
    background: rgba(255,255,255,.22);
    color: #fff;
}

/* ============================================================
   CONTENT PAGES (privacy, terms, faq, contact)
   ============================================================ */
.page-hero {
    background: var(--bg-alt);
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--border-light);
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-hero .last-updated {
    font-size: .9rem;
    color: var(--text-tertiary);
}

.content-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

/* Page body background for content pages */
body.page-body {
    background: var(--bg-alt);
}

.content-wrap h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 44px;
    margin-bottom: 12px;
    letter-spacing: -.02em;
}

.content-wrap h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 28px;
    margin-bottom: 10px;
}

.content-wrap p {
    font-size: .96rem;
    color: #3A3A3C;
    margin-bottom: 14px;
    line-height: 1.72;
}

.content-wrap ul,
.content-wrap ol {
    margin-left: 1.5rem;
    margin-bottom: 14px;
}

.content-wrap li {
    font-size: .96rem;
    color: #3A3A3C;
    margin-bottom: 6px;
    line-height: 1.65;
}

.notice-box {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 24px 0;
    font-size: .9rem;
    line-height: 1.6;
}

.notice-box.warning {
    background: #FFF8EC;
    border-left: 3px solid #F5A623;
    color: #7A5C00;
}

.notice-box.info {
    background: #EEF5FF;
    border-left: 3px solid var(--accent);
    color: #00408A;
}

.notice-box.success {
    background: #EDFAF2;
    border-left: 3px solid #2FB35B;
    color: #0A4D1F;
}

.content-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: .88rem;
}

.content-wrap table th {
    background: var(--bg-alt);
    color: var(--text-primary);
    font-weight: 600;
    padding: 11px 14px;
    text-align: left;
    border: 1px solid var(--border-light);
}

.content-wrap table td {
    padding: 11px 14px;
    border: 1px solid var(--border-light);
    color: #3A3A3C;
    vertical-align: top;
}

.content-wrap table tr:nth-child(even) td {
    background: #FAFAFA;
}

.content-divider {
    height: 1px;
    background: var(--border-light);
    margin: 40px 0;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-tabs-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.faq-tab-btn {
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    font-family: var(--font);
}

.faq-tab-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.faq-tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.faq-category { display: none; }
.faq-category.active { display: block; }

.faq-accordion { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg);
    transition: box-shadow .2s;
}

.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font);
    font-size: .97rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background .2s;
}

.faq-question:hover { background: var(--bg-alt); }

.faq-question .icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .85rem;
    transition: transform .3s, background .2s;
    color: var(--text-secondary);
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
    background: var(--accent);
    color: #fff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .3s;
    padding: 0 20px;
    font-size: .93rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.faq-answer.open {
    max-height: 600px;
    padding: 4px 20px 18px;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 16px 0;
}

.contact-card p {
    margin-bottom: 6px !important;
}

.contact-form {
    margin-top: 36px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: .87rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .95rem;
    color: var(--text-primary);
    background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,113,227,.3);
}

.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    display: none;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-top: 14px;
}

.form-message.success {
    display: block;
    background: #EDFAF2;
    border: 1px solid #2FB35B;
    color: #0A4D1F;
}

.form-message.error {
    display: block;
    background: #FFF1F0;
    border: 1px solid #FF453A;
    color: #7A0000;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--text-primary);
    color: rgba(255,255,255,.6);
    padding: 48px 0 36px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: start;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 24px;
}

.footer-brand {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: .85rem;
    color: rgba(255,255,255,.45);
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.footer-links-group a {
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    transition: color .2s;
}

.footer-links-group a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: rgba(255,255,255,.35);
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; gap: 40px; }
    .hero-image { order: -1; }
    .phone-mockup img { max-height: 360px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before { display: none; }
    .results-section .container { grid-template-columns: 1fr; gap: 40px; }
    .results-visual { order: -1; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links-group { align-items: flex-start; }
}

@media (max-width: 640px) {
    .nav-menu { display: none; flex-direction: column; gap: 0; }
    .nav-menu.open {
        display: flex;
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        background: rgba(255,255,255,.97);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-light);
        padding: 16px 0;
        box-shadow: var(--shadow-md);
    }
    .nav-menu.open li { padding: 0 24px; }
    .nav-menu.open a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--border-light); }
    .nav-toggle { display: flex; }
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 64px 0 48px; }
    .cta-section { padding: 60px 0; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
