
/* ================= YOUR GLOBAL THEME SYSTEM ================= */
:root {
    --bg: #fff1df;
    --surface: #fff7ef;
    --surface-strong: #ffffff;
    --surface-dark: #a5431a;
    --ink: #351b12;
    --muted: #765142;
    --accent: #ff9f1c;
    --accent-deep: #e85d04;
    --line: rgba(53, 27, 18, 0.13);
    --shadow: 0 24px 70px rgba(120, 52, 16, 0.14);
}

[data-theme="dark"] {
    --bg: #110906;
    --surface: #1a100c;
    --surface-strong: #20130e;
    --surface-dark: #130c09;
    --ink: #fff7f0;
    --muted: #e3c8b9;
    --accent: #ffb15c;
    --accent-deep: #ff7a1a;
    --line: rgba(89, 55, 38, 0.78);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--ink);
    padding-top: 56px;
    background:
        radial-gradient(circle at top right, rgba(255, 177, 92, 0.28), transparent 28rem),
        radial-gradient(circle at left top, rgba(232, 93, 4, 0.18), transparent 24rem),
        radial-gradient(circle at 20% 95%, rgba(0, 185, 212, 0.12), transparent 22rem),
        var(--bg);
    line-height: 1.55;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

/* ================= HEADER ================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: var(--surface-strong);
    border-bottom: 1px solid var(--line);
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
}
[data-theme="dark"] .site-header {
    background: rgba(19, 12, 9, 0.92);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: var(--ink);
}

.brand-with-mark { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: clamp(38px, 5vw, 44px); height: clamp(38px, 5vw, 44px);
    max-width: 44px; max-height: 44px;
    border-radius: clamp(11px, 1.6vw, 14px);
    overflow: hidden; flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(16, 34, 45, 0.16);
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.top-nav {
    display: flex; align-items: center; gap: 1.1rem;
    color: var(--muted);
}
.top-nav a {
    position: relative; padding: 0.25rem 0; transition: color 160ms ease;
    color: var(--muted);
}
.top-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -0.55rem;
    height: 2px; border-radius: 999px; background: var(--accent-deep);
    opacity: 0; transform: scaleX(0.4); transition: opacity 180ms, transform 180ms;
}
.top-nav a.is-active { color: var(--ink); }
.top-nav a.is-active::after { opacity: 1; transform: scaleX(1); }
.top-nav a:hover { color: var(--accent-deep); }

.menu-toggle {
    display: none; width: 48px; height: 48px; border: 1px solid var(--line);
    border-radius: 14px; background: var(--surface-strong); align-items: center;
    justify-content: center; flex-direction: column; gap: 5px; cursor: pointer;
}
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 999px; background: var(--ink); }

.theme-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 0.9rem; border: 1px solid var(--line);
    border-radius: 14px; background: var(--surface-strong); color: var(--ink);
    cursor: pointer; font: inherit;
}
.theme-toggle-icon { font-size: 1rem; line-height: 1; }

/* ================= TOP CTA STRIP ================= */
.top-cta-strip {
    position: fixed;
    top: calc(72px + constant(safe-area-inset-top));
    top: calc(72px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 19;
    background: rgba(17, 9, 6, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    padding: 0.6rem 1rem;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.top-cta-strip.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
.top-cta-strip-inner {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    max-width: 900px;
    width: 100%;
    justify-content: space-between;
}
.top-cta-strip-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}
.top-cta-strip a {
    padding: 0.4rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    color: white;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

/* ================= HERO ================= */
.hero { padding: 5.5rem 0 3rem; position: relative; }
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(10px);
}
.hero::before {
    width: 220px; height: 220px; right: 8%; top: 2rem;
    background: radial-gradient(circle, rgba(255, 152, 0, 0.24), transparent 70%);
    animation: pulseGlow 7s ease-in-out infinite;
}
[data-theme="dark"] .hero::before { background: radial-gradient(circle, rgba(255, 177, 92, 0.18), transparent 70%); }
.hero::after {
    width: 180px; height: 180px; left: 3%; bottom: 1rem;
    background: radial-gradient(circle, rgba(255, 159, 28, 0.24), transparent 70%);
    animation: pulseGlow 8s ease-in-out infinite reverse;
}
[data-theme="dark"] .hero::after { background: radial-gradient(circle, rgba(255, 122, 26, 0.2), transparent 70%); }

.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
.hero h1 { margin: 0.9rem 0; line-height: 1.02; font-size: clamp(2.5rem, 5vw, 4.8rem); max-width: 10ch; color: var(--ink); }
.hero-text, .hero-note { color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 1.5rem 0 1rem; }

.eyebrow {
    display: inline-flex; align-items: center; padding: 0.35rem 0.75rem;
    border-radius: 999px; background: rgba(232, 93, 4, 0.1); color: #a5431a;
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
[data-theme="dark"] .eyebrow {
    background: rgba(255, 177, 92, 0.16); color: #ffe0c0;
}

.hero-visual { position: relative; min-height: 520px; }
.phone-card {
    position: absolute; width: min(100%, 290px); background: var(--surface-strong);
    border-radius: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden;
}
.phone-card.tall { left: 0; top: 0; }
.phone-card.offset { right: 0; top: 5rem; }
.phone-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }

/* ================= SECTIONS & GRIDS ================= */
.section { padding: 5rem 0; }
.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 { margin: 0.9rem 0; line-height: 1.02; color: var(--ink); }
.section-heading p { color: var(--muted); max-width: 60ch; margin: 0 auto; }

.section-header-img {
    height: 280px; width: 100%; object-fit: cover; margin-bottom: 2rem;
    border-radius: 24px; box-shadow: var(--shadow);
}

.stack-card {
    background: var(--surface-strong); padding: 1.5rem; border-radius: 24px;
    border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
    max-width: 100%; text-align: center;
}
.stack-card iframe { width: 100%; max-height: 500px; border: none; }

/* Tour Grid Styling */
.tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.tour-card {
    background: var(--surface);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tour-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tour-card h4 { margin-top: 0; color: var(--ink); }
.tour-card .price { color: var(--accent-deep); font-weight: bold; font-size: 1.1rem; }
.tour-card .duration { color: var(--muted); font-size: 0.9rem; }
.tour-card p { margin: 0.5rem 0; color: var(--muted); font-size: 0.95rem; }
.tour-card .book-btn {
    display: inline-block; margin-top: 0.5rem; padding: 0.4rem 1.2rem;
    border-radius: 30px; background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    color: white; font-weight: 600; text-decoration: none; font-size: 0.9rem;
    border: none; cursor: pointer; transition: transform 0.2s;
}
.tour-card .book-btn:hover { transform: scale(1.03); }

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.comparison-table th {
    background: var(--accent-deep);
    color: white;
    padding: 0.8rem;
    text-align: left;
    border-radius: 8px 8px 0 0;
}
.comparison-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}
.comparison-table tr:last-child td { border-bottom: none; }
[data-theme="dark"] .comparison-table th { background: var(--accent); color: var(--ink); }

/* FAQ Grid Styling */
.faq-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}
.faq-item {
    padding: 1.2rem;
    border-radius: 22px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    float: right;
    color: var(--accent-deep);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 0.8rem; color: var(--muted); }

/* Internal Links Grid */
.internal-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}
.internal-links-grid a {
    background: var(--bg);
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    text-align: center;
    font-weight: 600;
    color: var(--ink);
    transition: background 0.2s, transform 0.2s;
}
.internal-links-grid a:hover {
    background: var(--surface-strong);
    transform: translateY(-2px);
}

/* ================= CTA SECTION ================= */
.cta-card {
    padding: 2.5rem; border-radius: 32px; background: linear-gradient(145deg, var(--accent-deep), var(--surface-dark));
    color: white; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
}
[data-theme="dark"] .cta-card { background: linear-gradient(145deg, #130c09, #471f0e); color: var(--ink); }
.cta-card h2 { margin: 0.9rem 0; line-height: 1.02; color: inherit; }
.cta-card p { color: rgba(255, 255, 255, 0.85); }
[data-theme="dark"] .cta-card p { color: var(--muted); }

.store-button {
    min-width: 180px; padding: 0.95rem 1.15rem; border-radius: 18px;
    border: 1px solid var(--line); background: var(--surface-strong); box-shadow: var(--shadow);
    display: inline-flex; flex-direction: column; gap: 0.08rem;
    transition: transform 160ms ease, border-color 160ms ease; color: var(--ink);
}
.store-button:hover { transform: translateY(-2px); border-color: rgba(223, 126, 34, 0.35); }
.store-button.primary { background: linear-gradient(135deg, var(--accent-deep), var(--accent)); color: white; border: none; }
.store-label { font-size: 0.78rem; opacity: 0.78; }

/* ================= FOOTER ================= */
.site-footer { padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr; gap: 1.5rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; color: var(--muted); }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-deep); }
.footer-meta { margin-top: 1.5rem; color: var(--muted); }

/* ================= ANIMATIONS ================= */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.floating-card { animation: floatCard 6s ease-in-out infinite; }
.delayed-float { animation-delay: 1.2s; }

.js-reveal-ready .reveal-target {
    opacity: 0; transform: translate3d(0, 26px, 0);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.js-reveal-ready .reveal-target.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .js-reveal-ready .reveal-target, .js-reveal-ready .reveal-target.is-visible { opacity: 1 !important; transform: none !important; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .hero-grid, .footer-grid, .cta-card { grid-template-columns: 1fr; }
    .hero-visual { min-height: 640px; }
}

@media (max-width: 720px) {
    body { padding-top: 40px; }
    .menu-toggle { display: inline-flex; }
    .top-nav {
        position: absolute; top: calc(100% + 10px); left: 1rem; right: 1rem;
        display: none; flex-direction: column; align-items: stretch; gap: 0.2rem;
        padding: 0.75rem; border-radius: 20px; background: var(--surface-strong); border: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .top-nav.is-open { display: flex; }
    .top-nav a { padding: 0.85rem 0.9rem; border-radius: 14px; background: rgba(232, 93, 4, 0.06); color: var(--ink); }
    .top-nav a::after { display: none; }
    [data-theme="dark"] .top-nav { background: rgba(17, 17, 19, 0.98); border-color: rgba(42, 52, 64, 0.92); }
    [data-theme="dark"] .top-nav a { background: rgba(255, 255, 255, 0.04); }
    
    .hero { padding-top: 3.5rem; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { min-height: 760px; }
    .phone-card { position: relative; width: 100%; max-width: 100%; left: auto !important; right: auto !important; top: auto !important; margin-top: 1rem; }
    .store-button { flex: 1 1 100%; }
    .comparison-table { font-size: 0.8rem; }
    .comparison-table th, .comparison-table td { padding: 0.5rem; }
}

@media (max-width: 520px) {
    body { padding-top: 30px; }
    .container { width: min(100% - 1rem, 1120px); }
    .header-inner { gap: 0.55rem; min-height: 64px; }
    .brand { font-size: 1.08rem; letter-spacing: 0.015em; }
    .brand-with-mark { gap: 0.5rem; }
    .brand-mark { width: 36px; height: 36px; max-width: 36px; max-height: 36px; border-radius: 11px; }
    .theme-toggle { padding: 0.7rem; justify-content: center; }
    .theme-toggle span:last-child { display: none; }
    .hero { padding-top: 2.75rem; }
    .hero h1 { max-width: 100%; }
    .section-header-img { height: 200px; }
    
    .top-cta-strip-text { display: none; }
}
