/* ========================================
   TempBox — style.css v2
   Deep navy base · Amber gold accent · Glass surfaces
   ======================================== */

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

:root {
    --navy:        #0d0f1a;
    --navy-mid:    #131629;
    --navy-card:   #181c30;
    --navy-lift:   #1e2340;
    --gold:        #f5a623;
    --gold-dim:    #c4841a;
    --gold-glow:   rgba(245,166,35,0.15);
    --gold-border: rgba(245,166,35,0.22);
    --white:       #f0f2ff;
    --muted:       #7a86a8;
    --muted-light: #a0aec8;
    --green:       #22d3a5;
    --red:         #ff6b6b;
    --radius:      14px;
    --radius-sm:   9px;
    --radius-xs:   6px;
    --shadow:      0 8px 32px rgba(0,0,0,0.45);
    --shadow-gold: 0 0 0 3px rgba(245,166,35,0.18);
    --font-main:   'Space Grotesk', sans-serif;
    --font-mono:   'JetBrains Mono', monospace;
    --transition:  0.18s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    /* subtle grid pattern */
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245,166,35,0.07) 0%, transparent 70%),
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ────────────────────────────────── */
.header {
    border-bottom: 1px solid var(--gold-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: rgba(13,15,26,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
}
.nav { display: flex; gap: 24px; }
.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform var(--transition);
}
.nav a:hover { color: var(--white); }
.nav a:hover::after { transform: scaleX(1); }

/* ── Hero ──────────────────────────────────── */
.hero {
    padding: 80px 0 44px;
    text-align: center;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(245,166,35,0.08);
    border: 1px solid var(--gold-border);
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 24px;
}
.hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse 2s infinite;
}
.hero-title {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--white);
    margin-bottom: 18px;
}
.hero-title .accent {
    color: var(--gold);
    position: relative;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Email Box ─────────────────────────────── */
.emailbox-section { padding: 0 0 44px; }

.emailbox {
    background: var(--navy-card);
    border: 1.5px solid var(--gold-border);
    border-radius: var(--radius);
    padding: 30px 32px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
}
.emailbox::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
}

.emailbox-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}
.emailbox-address-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.emailbox-address {
    font-family: var(--font-mono);
    font-size: clamp(0.95rem, 3vw, 1.4rem);
    font-weight: 500;
    color: var(--gold);
    background: rgba(245,166,35,0.06);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    flex: 1;
    min-width: 0;
    word-break: break-all;
    transition: background var(--transition), box-shadow var(--transition);
}
.emailbox-address:not(:empty):hover {
    background: rgba(245,166,35,0.1);
    box-shadow: var(--shadow-gold);
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 20px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.btn-copy:hover {
    background: #e09615;
    box-shadow: 0 4px 16px rgba(245,166,35,0.35);
}
.btn-copy:active { transform: scale(0.96); }
.btn-copy.copied {
    background: var(--green);
    color: #fff;
    box-shadow: 0 4px 16px rgba(34,211,165,0.35);
}

.emailbox-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-new {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: var(--font-main);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-new:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.04);
}

.auto-refresh-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--muted);
    margin-left: auto;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.8); }
}

/* ── Inbox Section ─────────────────────────── */
.inbox-section { padding-bottom: 64px; }

.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.inbox-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
}
.btn-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}
.btn-refresh:hover { color: var(--white); border-color: rgba(255,255,255,0.25); }
.btn-refresh.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.inbox-box {
    background: var(--navy-card);
    border: 1.5px solid var(--gold-border);
    border-radius: var(--radius);
    min-height: 240px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.inbox-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 64px 24px;
    color: var(--muted);
    text-align: center;
}
.inbox-empty svg { opacity: 0.25; }
.inbox-empty p { font-size: 0.95rem; color: var(--muted-light); }
.inbox-empty small { font-size: 0.78rem; opacity: 0.6; }

/* ── Email Rows ────────────────────────────── */
.email-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 20px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}
.email-row::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--gold);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity var(--transition);
}
.email-row:last-child { border-bottom: none; }
.email-row:hover { background: rgba(245,166,35,0.05); }
.email-row:hover::before { opacity: 0.6; }
.email-row.unread { background: rgba(245,166,35,0.03); }
.email-row.unread::before { opacity: 1; }
.email-row.unread .email-subject { color: var(--white); font-weight: 600; }
.email-row.unread .email-from { color: var(--gold); }

.email-from {
    font-size: 0.78rem;
    color: var(--muted-light);
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 1;
}
.email-subject {
    font-size: 0.92rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.email-date {
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
    text-align: right;
    grid-row: 1;
    grid-column: 2;
    align-self: start;
    padding-top: 1px;
    font-family: var(--font-mono);
}
.new-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(245,166,35,0.15);
    color: var(--gold);
    border: 1px solid rgba(245,166,35,0.3);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

/* ── Modal ─────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,7,18,0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-overlay.open { display: flex; }

.modal {
    background: var(--navy-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(245,166,35,0.06);
    animation: slideUp 0.2s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(to bottom, rgba(245,166,35,0.04), transparent);
    flex-shrink: 0;
}
.modal-meta { flex: 1; min-width: 0; }
.modal-subject {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
    word-break: break-word;
    line-height: 1.35;
}
.modal-from {
    font-size: 0.8rem;
    color: var(--gold);
    margin-bottom: 3px;
    font-family: var(--font-mono);
}
.modal-date {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: var(--font-mono);
}
.modal-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--muted);
    cursor: pointer;
    padding: 7px;
    flex-shrink: 0;
    border-radius: var(--radius-xs);
    transition: background var(--transition), color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: rgba(255,107,107,0.15);
    color: var(--red);
    border-color: rgba(255,107,107,0.3);
}

/* Modal body + iframe */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--white);
    scrollbar-width: thin;
    scrollbar-color: rgba(245,166,35,0.3) transparent;
}
.modal-body::-webkit-scrollbar { width: 5px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(245,166,35,0.25); border-radius: 99px; }

/* Text-only email content padding */
.modal-body > pre,
.modal-body > p {
    padding: 24px 28px;
}
.modal-body a { color: var(--gold); }

/* iframe wrapper for HTML emails */
.email-iframe-wrap {
    width: 100%;
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.email-iframe-wrap iframe {
    width: 100%;
    min-height: 400px;
    border: none;
    display: block;
}

/* Attachments bar */
.modal-attachments {
    margin: 0;
    padding: 16px 28px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(245,166,35,0.03);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.modal-attachments-label {
    font-size: 0.75rem;
    color: var(--muted);
    width: 100%;
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,166,35,0.08);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-xs);
    padding: 5px 12px;
    font-size: 0.78rem;
    color: var(--muted-light);
}

/* ── Features ──────────────────────────────── */
.features-section {
    padding: 48px 0 80px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}
.feature-card {
    background: var(--navy-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    padding: 24px 22px;
    transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-2px);
}
.feature-icon {
    font-size: 1.6rem;
    margin-bottom: 14px;
    display: block;
}
.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--white);
}
.feature-card p {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.55;
}

/* ── Footer ────────────────────────────────── */
.footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 28px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-copy { font-size: 0.8rem; color: var(--muted); }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-nav a:hover { color: var(--gold); }

/* ── FAQ & Privacy ─────────────────────────── */
.page-section {
    padding: 64px 0 88px;
    max-width: 680px;
    margin: 0 auto;
}
.page-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white);
}
.page-section .page-intro {
    color: var(--muted);
    margin-bottom: 44px;
}
.faq-item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 22px 0;
}
.faq-item h3 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}
.faq-item p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
}
.faq-item a { color: var(--gold); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 600px) {
    .emailbox { padding: 20px 18px; }
    .emailbox-address { font-size: 0.9rem; padding: 9px 12px; }
    .email-row { padding: 14px 16px; }
    .modal-header { padding: 18px 18px 16px; }
    .modal-body > pre, .modal-body > p { padding: 18px 18px; }
    .modal-attachments { padding: 14px 18px; }
    .modal-subject { font-size: 1rem; }
    .header-inner .nav { display: none; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .hero { padding: 56px 0 32px; }
}

/* ── Section Heading (features, faq inline) ── */
.section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* ── Inline FAQ on homepage ── */
.faq-inline-section {
    padding: 0 0 72px;
}
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 0;
    background: var(--navy-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.faq-grid .faq-item {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.05);
}
.faq-grid .faq-item:nth-child(even) { border-right: none; }
.faq-grid .faq-item:nth-last-child(-n+2) { border-bottom: none; }
.faq-grid .faq-item h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
}
.faq-grid .faq-item p {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.6;
}
.faq-grid .faq-item a { color: var(--gold); text-decoration: none; }
.faq-grid .faq-item a:hover { text-decoration: underline; }

/* ── How-steps on FAQ page ── */
.how-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--navy-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
}
.how-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.how-step:last-child { border-bottom: none; }
.how-step-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(245,166,35,0.1);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-xs);
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}
.how-step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 5px;
}
.how-step p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── Footer author link ── */
.footer-author {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}
.footer-author:hover { text-decoration: underline; }

/* ── Responsive additions ── */
@media (max-width: 600px) {
    .faq-grid { grid-template-columns: 1fr; }
    .faq-grid .faq-item { border-right: none; }
    .faq-grid .faq-item:last-child { border-bottom: none; }
    .faq-grid .faq-item:nth-last-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.05); }
    .faq-grid .faq-item:last-child { border-bottom: none; }
    .section-heading { font-size: 1.15rem; }
}
