/* =============================================
   HIGH PURITY DAY – Network Portal
   hpd.css — single stylesheet for all pages
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800;900&display=swap');

/* ── Reset ────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* ── Variables ────────────────────────────── */
:root {
    --hpd:       #46BBAF;
    --hpd-dark:  #329c91;
    --hpd-light: #e8f8f7;
    --hpd-dim:   rgba(70, 187, 175, 0.25);
    --white:     #ffffff;
    --black:     #111111;
    --gray:      #6b7280;
    --font:      'Inter', sans-serif;
    --sat:       env(safe-area-inset-top,    0px);
    --sab:       env(safe-area-inset-bottom, 0px);
}

/* ── Base ─────────────────────────────────── */
html {
    height: 100%;
    background: var(--hpd);
}

body {
    font-family: var(--font);
    background: var(--white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    overscroll-behavior: none;
}

body.body-teal {
    background: var(--hpd);
}

/* ── Desktop wrapper ──────────────────────── */
@media (min-width: 441px) {
    body           { background: #d1d5db; align-items: center; }
    body.body-teal { background: var(--hpd); }
}

/* ── Phone shell ──────────────────────────── */
.phone {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: 440px;
    background: var(--white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

@media (min-width: 441px) {
    .phone {
        max-height: 956px;
        margin: auto;
        box-shadow: 0 40px 100px rgba(0,0,0,0.3);
    }
}

/* ── Hero ─────────────────────────────────── */
.hero {
    flex: 0 0 50%;
    position: relative;
    background-color: var(--hpd);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: calc(-1 * var(--sat));
    padding-top: var(--sat);
    box-sizing: content-box;
}

/* ── Card ─────────────────────────────────── */
.card {
    flex: 1 1 0;
    min-height: 0;
    padding: clamp(20px, 4.5vh, 40px) clamp(20px, 6.5vw, 32px);
    padding-bottom: calc(clamp(16px, 3vh, 28px) + var(--sab));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--white);
    overflow: hidden;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.8vh, 16px);
}

.card-heading {
    color: var(--hpd);
    font-size: clamp(28px, 8vw, 52px);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -1px;
}

.card-subtitle {
    color: var(--hpd);
    font-size: clamp(14px, 4vw, 22px);
    font-weight: 300;
    line-height: 1.45;
}

.card-desc {
    color: var(--hpd);
    font-size: clamp(12px, 3.2vw, 16px);
    font-weight: 700;
    line-height: 1.6;
}

/* ── Nav area ─────────────────────────────── */
.nav-area {
    padding-top: clamp(12px, 2.5vh, 24px);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(8px, 1.6vh, 16px);
}

.nav-spacer {
    width: clamp(38px, 10vw, 50px);
    height: clamp(38px, 10vw, 50px);
    flex-shrink: 0;
}

/* ── Dots ─────────────────────────────────── */
.dots {
    display: flex;
    align-items: center;
    gap: clamp(7px, 2vw, 11px);
}

.dot {
    width: clamp(7px, 2vw, 10px);
    height: clamp(7px, 2vw, 10px);
    border-radius: 50%;
    background: var(--hpd-dim);
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: var(--hpd);
    transform: scale(1.25);
}

.step-nav .dot {
    background: rgba(255, 255, 255, 0.35);
}

.step-nav .dot.active {
    background: var(--white);
    transform: scale(1.25);
}

/* ── Arrow button (welcome) ───────────────── */
.btn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width:  clamp(38px, 10vw, 50px);
    height: clamp(38px, 10vw, 50px);
    border-radius: 50%;
    background: var(--hpd);
    color: var(--white);
    font-size: clamp(14px, 4vw, 18px);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-arrow:hover { background: var(--hpd-dark); transform: scale(0.94); }

/* ── Skip link ────────────────────────────── */
.skip-link {
    display: block;
    text-align: center;
    color: var(--gray);
    font-size: clamp(11px, 3vw, 14px);
    font-weight: 500;
    text-decoration: none;
    padding: 4px;
}

.skip-link:hover { color: var(--hpd); }

/* ==============================================
   STEP PAGES
   ============================================== */

.step-phone {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: 440px;
    background: var(--hpd);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 441px) {
    .step-phone {
        max-height: 956px;
        margin: auto;
        box-shadow: 0 40px 100px rgba(0,0,0,0.3);
    }
}

/* Logo at top of body */
.step-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: calc(var(--sat) + clamp(100px, 18vh, 140px));
    padding-bottom: clamp(24px, 5vh, 48px);
    flex-shrink: 0;
}

.step-logo {
    height: clamp(60px, 14vh, 90px);
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Body content area */
.step-body {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 clamp(24px, 7vw, 36px);
}

.step-main {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(16px, 3.5vh, 32px);
}

/* Lamp / step icon */
.step-icon { flex-shrink: 0; }

.step-icon-img {
    width:  clamp(42px, 11vw, 62px);
    height: clamp(42px, 11vw, 62px);
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Text content */
.step-content {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.5vh, 22px);
}

.step-heading {
    color: var(--white);
    font-size: clamp(26px, 7.5vw, 42px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.5px;
}

.step-text {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(13px, 3.8vw, 17px);
    font-weight: 400;
    line-height: 1.65;
}

/* Bottom nav */
.step-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(14px, 3vh, 24px) clamp(24px, 7vw, 36px);
    padding-bottom: calc(clamp(14px, 3vh, 24px) + var(--sab));
}

.step-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width:  clamp(36px, 10vw, 48px);
    height: clamp(36px, 10vw, 48px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    color: var(--white);
    font-size: clamp(13px, 3.8vw, 17px);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.step-nav-arrow:hover {
    background: rgba(255,255,255,0.28);
    transform: scale(0.94);
}

/* ==============================================
   LANGUAGE SWITCHER
   ============================================== */

.lang-switcher {
    position: fixed;
    top: calc(var(--sat) + 12px);
    right: 16px;
    z-index: 100;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px 7px 9px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    cursor: pointer;
    color: var(--white);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.lang-btn:hover { background: rgba(255,255,255,0.28); }

.lang-flag     { font-size: 16px; line-height: 1; }
.lang-code     { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.lang-chevron  { font-size: 10px; opacity: 0.85; transition: transform 0.25s ease; }

.lang-flag img,
.lang-option-flag img {
    display: block;
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.lang-btn .lang-flag img {
    width: 18px;
    height: 13px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top right;
}

.lang-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    text-align: left;
    transition: background 0.15s;
}

.lang-option:hover { background: var(--hpd-light); }
.lang-option + .lang-option { border-top: 1px solid rgba(0,0,0,0.06); }

.lang-option-flag  { font-size: 20px; line-height: 1; flex-shrink: 0; }
.lang-option-label { flex: 1; color: #1a1a1a; }

.lang-check { font-size: 11px; color: var(--hpd); opacity: 0; transition: opacity 0.15s; }
.lang-option.active .lang-check        { opacity: 1; }
.lang-option.active .lang-option-label { color: var(--hpd); font-weight: 700; }
