/* ═══════════════════════════════════════════════════════
   style_how.css  —  styles specific to how.html
   Requires: style_common.css
   ═══════════════════════════════════════════════════════ */

html { scroll-padding-top: 16rem; }

/* ── HERO overrides ── */
.hero { min-height: 70vh; }

.hero::before {
    background:
        radial-gradient(ellipse 55% 65% at 90% 20%, rgba(0,212,255,0.08) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 10% 75%, rgba(200,80,255,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 55% 95%, rgba(57,232,122,0.04) 0%, transparent 50%);
}

.hero h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); max-width: 20ch; }
.hero-sub { max-width: 54ch; }

.hero-cta {
    margin-top: 2rem;
    opacity: 0;
    animation: fadeUp 0.6s 0.48s forwards;
}

/* ── SECTION LABEL ── */
.section-label { font-size: 0.68rem; }

/* ── FRACTAL ARCHITECTURE ── */
.arch-section {
    padding: 6rem 3rem;
    border-bottom: 1px solid var(--border);
}

.arch-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    max-width: 28ch;
    margin-bottom: 1.25rem;
}

.arch-section > p {
    color: #7aa8bc;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
    max-width: 62ch;
    margin-bottom: 1rem;
}

/* Fractal node diagram */
.fractal-diagram {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.fractal-node {
    background: var(--mid);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background 0.2s;
    position: relative;
    overflow: hidden;
}

.fractal-node::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.fractal-node:hover { background: #0d1e30; }
.fractal-node:hover::before { transform: scaleX(1); }

.fractal-node-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.fractal-node-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
}

.fractal-node-desc { font-size: 0.82rem; color: var(--muted); font-weight: 300; line-height: 1.6; }

.fractal-node-badge {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    margin-top: auto;
    align-self: flex-start;
}

/* ── DEPLOY SECTION ── */
.deploy-section {
    padding: 6rem 3rem;
    background: var(--mid2);
    border-bottom: 1px solid var(--border);
}

.deploy-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    max-width: 28ch;
    margin-bottom: 3.5rem;
}

.deploy-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.deploy-card {
    background: var(--mid);
    border: 1px solid var(--border2);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.deploy-card:hover {
    border-color: rgba(0,212,255,0.3);
    box-shadow: 0 0 28px rgba(0,212,255,0.05);
}

.deploy-card-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(0,212,255,0.1);
}

.deploy-card h3 { font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 700; color: var(--white); }
.deploy-card p { font-size: 0.92rem; color: #7aa8bc; font-weight: 300; line-height: 1.7; }

/* Tip callout */
.tip-callout {
    margin-top: 3rem;
    background: rgba(0,212,255,0.04);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tip-callout-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
.tip-callout p { font-size: 0.92rem; color: #7aa8bc; font-weight: 300; line-height: 1.7; }

/* ── COMPARISON TABLE ── */
.table-section {
    padding: 6rem 3rem;
    border-bottom: 1px solid var(--border);
}

.table-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.table-section .sub {
    color: #7aa8bc;
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 3rem;
    font-style: italic;
}

.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.comparison-table thead th {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table thead th:nth-child(1) { color: var(--muted); width: 28%; }
.comparison-table thead th:nth-child(2) { color: var(--muted); width: 36%; }
.comparison-table thead th:nth-child(3) { color: var(--accent); width: 36%; }
.comparison-table thead th:nth-child(3) { background: rgba(0,212,255,0.04); border-left: 1px solid var(--border); }

.comparison-table tbody td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border2);
    vertical-align: top;
    line-height: 1.55;
}

.comparison-table tbody td:nth-child(1) {
    color: var(--white);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.comparison-table tbody td:nth-child(2) { color: #6a9ab0; }
.comparison-table tbody td:nth-child(3) { color: var(--accent); background: rgba(0,212,255,0.03); border-left: 1px solid var(--border); }

.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover td { background: rgba(0,212,255,0.025); }
.comparison-table tbody tr:hover td:nth-child(3) { background: rgba(0,212,255,0.06); }

.table-note { margin-top: 1.25rem; font-size: 0.78rem; color: var(--muted); font-style: italic; }

/* ── POC SECTION ── */
.poc-section {
    padding: 6rem 3rem;
    background: var(--mid2);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.poc-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.poc-section p { color: #7aa8bc; font-size: 1rem; font-weight: 300; line-height: 1.85; margin-bottom: 2rem; }

.poc-timeline { display: flex; flex-direction: column; gap: 0; }

.poc-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border2);
    position: relative;
}

.poc-step:last-child { border-bottom: none; }

.poc-step-marker { display: flex; flex-direction: column; align-items: center; gap: 0; }

.poc-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0,212,255,0.5);
    margin-top: 4px;
}

.poc-step-line { flex: 1; width: 1px; background: var(--border); margin-top: 6px; }
.poc-step:last-child .poc-step-line { display: none; }

.poc-step-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.poc-step h4 { font-family: 'Montserrat', sans-serif; font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.poc-step p { font-size: 0.88rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* ── CTA STRIP ── */
.cta-strip {
    background: var(--black);
    border-top: 1px solid var(--border);
    padding: 6rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 50% 50%, rgba(200,80,255,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 70% 80%, rgba(0,212,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.cta-strip h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.cta-strip p {
    color: #7aa8bc;
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 2.25rem;
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}

.btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── SCROLL ANIMATIONS ── */
.animate { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate.in-view { opacity: 1; transform: translateY(0); }

/* ── TABLET ── */
@media (max-width: 1024px) {
    .arch-section, .deploy-section, .table-section, .poc-section, .cta-strip { padding: 5rem 2rem; }
    .deploy-cards { grid-template-columns: 1fr 1fr; }
    .fractal-diagram { grid-template-columns: 1fr 1fr; }
    .poc-section { grid-template-columns: 1fr; gap: 3rem; }
}

/* ── MOBILE ── */
@media (max-width: 767px) {
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); max-width: 100%; }
    .hero-cta .btn { width: 100%; justify-content: center; }

    .arch-section, .deploy-section, .table-section, .cta-strip { padding: 4rem 1.25rem; }
    .poc-section { padding: 4rem 1.25rem; grid-template-columns: 1fr; gap: 2.5rem; }

    .fractal-diagram { grid-template-columns: 1fr 1fr; }
    .fractal-node { padding: 1.5rem 1rem; }
    .fractal-node-desc { display: none; }

    .deploy-cards { grid-template-columns: 1fr; gap: 1rem; }
    .deploy-card { padding: 1.75rem 1.5rem; }

    .tip-callout { padding: 1.25rem; }

    .btn-row { flex-direction: column; align-items: center; }
    .btn-row .btn { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) { .fractal-diagram { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .hero h1 { font-size: 1.75rem; } }
