/* Examora – Shared Styles */

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

:root {
    --blue:        #007AFF;
    --blue-bg:     rgba(0, 122, 255, 0.10);
    --green-bg:    rgba(52, 199, 89, 0.10);
    --orange-bg:   rgba(255, 149, 0, 0.10);
    --purple-bg:   rgba(175, 82, 222, 0.10);
    --teal-bg:     rgba(0, 199, 190, 0.10);
    --indigo-bg:   rgba(88, 86, 214, 0.10);

    --bg:          #F2F2F7;
    --surface:     #FFFFFF;
    --label:       #1C1C1E;
    --secondary:   rgba(60, 60, 67, 0.60);
    --tertiary:    rgba(60, 60, 67, 0.36);
    --separator:   rgba(60, 60, 67, 0.16);
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--label);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Navigation ─────────────────────────────────────────────── */

.nav {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--label);
}

.nav-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--blue-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    flex-shrink: 0;
}

.nav-brand-icon svg { display: block; }

.nav-brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--blue);
    font-size: 15px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.nav-links a:hover { background: var(--blue-bg); }

/* ── Layout ──────────────────────────────────────────────────── */

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

.page { padding: 40px 0 72px; }

/* ── Section label ───────────────────────────────────────────── */

.section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--secondary);
    margin-bottom: 12px;
}

/* ── Cards ───────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border-radius: 18px;
    padding: 22px;
}

.card + .card { margin-top: 12px; }

/* ── Feature rows (mirrors AboutSheet) ───────────────────────── */

.features { display: flex; flex-direction: column; gap: 22px; }

.feature-row { display: flex; gap: 14px; align-items: flex-start; }

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 19px;
    line-height: 1;
}

.feature-text h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--label);
}

.feature-text p {
    font-size: 14px;
    color: var(--secondary);
    line-height: 1.5;
}

/* ── Color helpers ───────────────────────────────────────────── */

.bg-blue   { background: var(--blue-bg);   }
.bg-green  { background: var(--green-bg);  }
.bg-orange { background: var(--orange-bg); }
.bg-purple { background: var(--purple-bg); }
.bg-teal   { background: var(--teal-bg);   }
.bg-indigo { background: var(--indigo-bg); }

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
    padding: 56px 20px 48px;
    text-align: center;
}

.hero-icon {
    width: 90px;
    height: 90px;
    background: var(--blue-bg);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--secondary);
    margin-bottom: 32px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.btn-appstore {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--label);
    color: #fff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
    transition: opacity 0.15s;
}

.btn-appstore:hover { opacity: 0.82; }

/* ── Page header (inner pages) ───────────────────────────────── */

.page-header { padding: 36px 0 28px; }

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-header .updated {
    font-size: 14px;
    color: var(--secondary);
}

/* ── Prose (privacy / terms) ─────────────────────────────────── */

.prose h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--label);
    margin-bottom: 10px;
}

.prose h2:not(:first-child) { margin-top: 6px; }

.prose p {
    font-size: 15px;
    color: rgba(28, 28, 30, 0.82);
    line-height: 1.68;
    margin-bottom: 10px;
}

.prose p:last-child { margin-bottom: 0; }

.prose ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.prose li {
    font-size: 15px;
    color: rgba(28, 28, 30, 0.82);
    line-height: 1.68;
    margin-bottom: 4px;
}

.prose a { color: var(--blue); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

.prose strong { color: var(--label); font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--separator);
    padding: 24px 20px;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copy {
    font-size: 13px;
    color: var(--tertiary);
}

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-links a {
    font-size: 13px;
    color: var(--secondary);
    text-decoration: none;
}

.footer-links a:hover { color: var(--blue); }

/* ── Contact section (full-width) ────────────────────────────── */

.contact-section {
    background: var(--surface);
    border-bottom: 1px solid var(--separator);
    padding: 48px 24px 40px;
}

.contact-inner {
    max-width: 720px;
    margin: 0 auto;
}

.contact-meta {
    margin-bottom: 24px;
}

.contact-icon-wrap {
    width: 52px;
    height: 52px;
    background: var(--blue-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.contact-heading {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--label);
    margin-bottom: 6px;
}

.contact-sub {
    font-size: 15px;
    color: var(--secondary);
    line-height: 1.55;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-textarea {
    width: 100%;
    padding: 16px;
    border: 1.5px solid var(--separator);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    background: var(--bg);
    color: var(--label);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    min-height: 160px;
}

.contact-textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.10);
}

.contact-textarea::placeholder { color: var(--tertiary); }

.contact-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg);
    border: 1.5px solid var(--separator);
    border-top: 1px solid var(--separator);
    border-radius: 0 0 14px 14px;
    padding: 10px 14px;
}

.contact-textarea:focus ~ .contact-toolbar {
    border-color: var(--blue);
}

.contact-toolbar-left,
.contact-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.icon-btn:hover { background: var(--separator); color: var(--label); }

.char-count {
    font-size: 13px;
    color: var(--tertiary);
    flex-shrink: 0;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
}

.contact-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.contact-btn:active:not(:disabled) { transform: translateY(0); }
.contact-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.image-preview-inner {
    position: relative;
    display: inline-block;
    margin-top: 12px;
}

.image-thumb {
    display: block;
    height: 80px;
    width: auto;
    max-width: 160px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--separator);
}

.image-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.55);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}

.image-remove:hover { background: rgba(0,0,0,0.75); }

.feedback-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
}

.feedback-success {
    background: rgba(52, 199, 89, 0.10);
    color: #1a7a35;
    border: 1px solid rgba(52, 199, 89, 0.25);
}

.feedback-error {
    background: rgba(255, 59, 48, 0.08);
    color: #c0392b;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 540px) {
    .nav-brand-name { font-size: 16px; }
    .nav-links a    { font-size: 14px; padding: 5px 8px; }
    .hero h1        { font-size: 26px; }
    .hero-subtitle  { font-size: 16px; }
    .site-footer .container { flex-direction: column; align-items: center; text-align: center; }
    .footer-links   { justify-content: center; }
}
