/* ============================================================
   Torvus website — styles
   Titles/nav: Review Wide (self-hosted).  Body: Inter (Google Fonts).
   ============================================================ */

@font-face {
    font-family: "Review Wide";
    src: url("fonts/ReviewWide-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --accent: #eb780a;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #b3b3b3;
    --placeholder: #666666;
    --surface-elevated: #242f45;
    --surface-neutral: #1b2435;
    --divider: #404047;
    --black: #000000;
    --near-black: #0d0d0d;
    --white: #ffffff;

    --nav-h: 84px;
    --section-px: 140px;    /* shared horizontal padding for every section's content */
    --content-max: 1040px;  /* shared content width cap, matching the Home hero text */
    --title-font: "Review Wide", "Arial Narrow", sans-serif;
    --body-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html, body { height: 100%; margin: 0; }

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--body-font);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- Interactive dotted background (canvas, mouse-reactive ripple) ---- */
.dot-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    display: block;
}

/* ---- Scroll container (the single vertical scroller) ---- */
.scroll-root {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
}

.section { scroll-margin-top: var(--nav-h); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    padding: 0 40px;
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
}
.logo img {
    height: 32px;
    width: auto;
    display: block;
}

.nav-links { display: flex; align-items: center; gap: 56px; }

.nav-link {
    position: relative;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: 22px;
    color: var(--white);
    background: none;
    border: 0;
    padding: 4px 2px;
}
/* underline: filled for the active section, fills in on hover — no colour change */
.nav-link::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--accent); }

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: 0;
    padding: 6px 2px;
}
.burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
}

/* ============================================================
   Home — horizontal pager
   ============================================================ */
.home {
    background: var(--black);
}

.home-hero {
    position: relative;
    isolation: isolate;
    height: 100vh;
    /* svh (small viewport height) is bar-independent, so the hero — and everything
       below it — does NOT reflow when the mobile address bar shows/hides on scroll. */
    height: 100svh;
    overflow: hidden;
    background: var(--black);
}

.home-viewport {
    height: 100%;
    overflow: hidden;
    /* reserve horizontal gestures for the swipe handler; keep vertical page scroll */
    touch-action: pan-y;
}
.home-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s ease;
    will-change: transform;
}

.home-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 40px;
    padding: calc(var(--nav-h) + 20px) var(--section-px) 80px;
}

.home-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: var(--content-max);
}

.home-hero-title {
    margin: 0;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.15;
    color: var(--white);
}
.home-hero-body {
    margin: 0;
    font-size: clamp(18px, 1.9vw, 30px);
    line-height: 1.6;
    color: var(--text-secondary);
}
.home-block-title {
    margin: 0;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: clamp(26px, 2.6vw, 40px);
    line-height: 1.2;
    color: var(--white);
}
.home-block-body {
    margin: 0;
    font-size: clamp(16px, 1.45vw, 24px);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* download band (below the Home pager, greyed out / coming soon) */
.home-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 72px var(--section-px) 84px;
    text-align: center;
    background: var(--black);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.home-download-title {
    margin: 0;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: clamp(24px, 2.4vw, 34px);
    color: var(--white);
}
.store-badges {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}
.store-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
    padding: 12px 22px;
    background: #14161c;
    border: 1px solid #3a3f4b;
    border-radius: 12px;
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed;
}
.store-badge-icon { flex: 0 0 auto; width: 28px; height: 28px; }
.store-badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}
.store-badge-small {
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #9ca3af;
}
.store-badge-big { font-size: 19px; font-weight: 600; color: #e5e7eb; }
.alpha-note {
    margin: 0;
    max-width: 520px;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
}

/* chevrons (desktop) */
.home-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 54px;
    border-radius: 16px;
    border: 0;
    background: var(--surface-neutral);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: filter 0.2s ease;
}
.home-chevron:hover { filter: brightness(1.25); }
.home-chevron.left { left: 66px; }
.home-chevron.right { right: 66px; }

.chevron {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-right: 2.5px solid var(--white);
    border-bottom: 2.5px solid var(--white);
}
.chevron.left { transform: rotate(135deg); margin-left: 3px; }
.chevron.right { transform: rotate(-45deg); margin-right: 3px; }

/* dots (mobile) */
.home-dots {
    display: none;
    position: absolute;
    bottom: 36px;
    left: 0; right: 0;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}
.home-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.2s ease;
}
.home-dot.active { background: var(--accent); }

/* ============================================================
   Services — alternating rows
   ============================================================ */
.services {
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-h) + 20px) 0 60px;
    background: var(--black);
}

.service-row {
    padding: 40px var(--section-px);
}
.service-row.light { background: var(--white); color: var(--near-black); }
.service-row-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 64px;
}
.service-row.reverse .service-row-inner { flex-direction: row-reverse; }

.service-card {
    flex: 0 0 auto;
    width: 264px;
    aspect-ratio: 600 / 1228;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface-neutral);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.service-row.light .service-card {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

.service-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-width: 0;
}
.service-title {
    margin: 0;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: clamp(26px, 2.4vw, 36px);
}
.service-body {
    margin: 0;
    font-size: clamp(16px, 1.45vw, 24px);
    line-height: 1.6;
    color: var(--text-secondary);
}
.service-row.light .service-body { color: var(--near-black); }

/* ============================================================
   Contact
   ============================================================ */
.contact {
    padding: calc(var(--nav-h) + 50px) var(--section-px) 80px;
    background: var(--black);
}
.contact-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.contact-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.contact-heading {
    margin: 0;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: 32px;
    color: var(--text-primary);
}
.contact-heading.spaced { letter-spacing: 3px; }
.divider {
    width: 100%;
    height: 1px;
    background: var(--divider);
}
.contact-email {
    width: fit-content;
    font-size: 24px;
    color: var(--white);
    transition: color 0.2s ease;
}
.contact-email:hover { color: var(--accent); }
.contact-social {
    display: inline-flex;
    width: fit-content;
    color: var(--white);
    transition: color 0.2s ease;
}
.ig-icon {
    display: block;
    width: 28px;
    height: 28px;
    background-color: currentColor;
    -webkit-mask: url("icons/instagram.svg") no-repeat center / contain;
    mask: url("icons/instagram.svg") no-repeat center / contain;
    transition: filter 0.2s ease;
}
.contact-social:hover { color: var(--accent); }
.contact-social:hover .ig-icon {
    filter: drop-shadow(0 0 6px rgba(235, 120, 10, 0.9)) drop-shadow(0 0 14px rgba(235, 120, 10, 0.55));
}
.legal-name { margin: 0; font-weight: 600; font-size: 24px; }
.legal-sub { margin: 0; font-size: 24px; color: var(--text-secondary); }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.form-intro { margin: 0; font-size: 24px; color: var(--text-secondary); }
.field {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.field label {
    font-family: var(--title-font);
    font-weight: 500;
    font-size: 20px;
    color: var(--text-muted);
}
.field input, .field textarea {
    width: 100%;
    padding: 20px 16px;
    background: var(--surface-neutral);
    border: 1px solid var(--divider);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--body-font);
    font-size: 20px;
    resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
/* Keep browser autofill on-theme (Chrome forces a light bg + dark text otherwise) */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill {
    -webkit-text-fill-color: var(--white);
    caret-color: var(--white);
    -webkit-box-shadow: 0 0 0 1000px var(--surface-neutral) inset;
    box-shadow: 0 0 0 1000px var(--surface-neutral) inset;
    transition: background-color 100000s ease-in-out 0s;
}
.field textarea { min-height: 160px; }

.send-btn {
    width: 200px;
    padding: 16px 0;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 20px;
    transition: filter 0.2s ease;
}
.send-btn:hover { filter: brightness(1.08); }
.send-btn:disabled { opacity: 0.6; cursor: default; filter: none; }

.form-status {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.5;
}
.form-status.success { color: #86efac; }
.form-status.error { color: #fca5a5; }

.copyright { margin: 0; font-size: 16px; color: var(--text-muted); }

/* ============================================================
   Mobile burger menu (full-screen overlay)
   ============================================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: var(--black);
}
.menu-close {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: 0;
    color: var(--white);
    font-size: 40px;
    line-height: 1;
}
.menu-link {
    position: relative;
    font-family: var(--title-font);
    font-weight: 500;
    font-size: 36px;
    color: var(--white);
    background: none;
    border: 0;
}
.menu-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}
.menu-link:hover::after,
.menu-link.active::after { transform: scaleX(1); }
.menu-link.active { color: var(--accent); }

/* ============================================================
   Responsive — mobile
   ============================================================ */
@media (max-width: 768px) {
    :root { --nav-h: 60px; --section-px: 24px; }

    .nav { padding: 0 20px; }
    .logo img { height: 22px; }
    .nav-links { display: none; }
    .burger { display: flex; }

    .home-slide { gap: 24px; padding: calc(var(--nav-h) + 40px) var(--section-px) 90px; }
    .home-chevron { display: none; }
    .home-dots { display: flex; }
    .home-download { padding: 52px var(--section-px) 60px; gap: 16px; }
    .home-download-title { font-size: 22px; }
    .store-badge { min-width: 160px; padding: 9px 16px; }
    .store-badge-big { font-size: 16px; }
    .alpha-note { font-size: 13px; }

    .service-row { padding: 48px var(--section-px); }
    .service-row-inner, .service-row.reverse .service-row-inner {
        flex-direction: column;
        gap: 28px;
        text-align: center;
        align-items: center;
    }
    .service-text { flex: none; align-items: center; max-width: 100%; }
    .service-card { width: 200px; }

    .contact { padding: calc(var(--nav-h) + 28px) var(--section-px) 64px; }
    .contact-inner { gap: 44px; }
    .contact-heading { font-size: 26px; }
    .contact-email, .legal-name, .legal-sub, .form-intro { font-size: 18px; }
    .field input, .field textarea { font-size: 18px; }
    .send-btn { width: 100%; }
}

/* Narrow phones — stack the store badges so they never overflow */
@media (max-width: 480px) {
    .store-badges {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .store-badge {
        width: 100%;
        max-width: 300px;
        min-width: 0;
        justify-content: center;
    }
}
