/* Shroomsweeper marketing site — Shroom Games studio brand
   Backed by the Shroom Games design system tokens.
   Themes: forest (light, default) and twilight (dark), scoped via data-theme on <html>. */

@import url("./styles/tokens/fonts.css");
@import url("./styles/tokens/colors.css");
@import url("./styles/tokens/typography.css");
@import url("./styles/tokens/spacing.css");

/* Twilight semantic aliases (colors.css declares them only under forest). */
[data-theme="twilight"] {
    --surface-app: var(--shroom-app);
    --surface-board: var(--shroom-board);
    --surface-card: var(--shroom-card);
    --surface-pill: var(--shroom-pill);
    --text-strong: var(--shroom-text);
    --text-soft: var(--shroom-text-soft);
    --accent: var(--shroom-accent);
    --on-accent: var(--shroom-on-accent);
}

:root {
    --shadow-soft: 0 10px 30px rgba(58, 61, 48, 0.08);
    --shadow-card-hover: 0 22px 40px -22px rgba(20, 22, 18, 0.45);
}

[data-theme="twilight"] {
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 22px 40px -22px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--surface-app);
    color: var(--text-strong);
    transition: background 0.4s var(--ease-soft), color 0.4s var(--ease-soft);
}

body {
    margin: 0;
    background: var(--surface-app);
    color: var(--text-strong);
    font-family: var(--font-display);
    font-weight: var(--fw-regular);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

.eyebrow {
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-loose);
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

/* ====================== Nav ====================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--surface-app) 82%, transparent);
    border-bottom: 1px solid var(--shroom-border);
}

.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--tile-covered);
    box-shadow: var(--tile-edge);
    flex: 0 0 auto;
}

.brand-name {
    font-weight: var(--fw-semibold);
    font-size: 19px;
    letter-spacing: -0.2px;
    color: var(--text-strong);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    font-size: 15px;
    font-weight: var(--fw-medium);
    color: var(--text-soft);
    transition: color 0.15s var(--ease-soft);
}

.nav-link:hover { color: var(--text-strong); }

/* ====================== Theme toggle ====================== */
.theme-toggle {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    background: var(--surface-pill);
    border: 1px solid var(--shroom-border);
    border-radius: var(--radius-pill);
}

.theme-toggle button {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-soft);
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: var(--text-sm);
    padding: 6px 14px;
    border-radius: var(--radius-chip);
    cursor: pointer;
    transition: background 0.15s var(--ease-soft), color 0.15s var(--ease-soft);
}

.theme-toggle button[aria-pressed="true"] {
    background: var(--accent);
    color: var(--on-accent);
}

/* ====================== Hero ====================== */
.hero {
    padding: clamp(40px, 7vw, 84px) 0 clamp(56px, 8vw, 96px);
}

.hero-grid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(36px, 5vw, 64px);
    align-items: center;
}

.hero-text {
    flex: 1 1 420px;
    min-width: 320px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.04;
    font-weight: var(--fw-semibold);
    letter-spacing: -1px;
    margin: 0 0 22px;
    text-wrap: balance;
}

.hero .lede {
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.55;
    color: var(--text-soft);
    max-width: 33em;
    margin: 0 0 30px;
    text-wrap: pretty;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 58px;
    padding: 0 26px;
    border-radius: var(--radius-button);
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 16px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s var(--ease-soft), background 0.15s var(--ease-soft), color 0.15s var(--ease-soft);
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
    background: var(--surface-card);
    color: var(--text-strong);
    border-color: var(--shroom-border);
}
.btn-secondary:hover { background: var(--surface-pill); }

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface-pill);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: var(--fw-medium);
    color: var(--text-strong);
}

.pill svg { color: var(--accent); }

/* Hero visual — phone-shaped screenshot slot, no fake UI */
.hero-visual {
    flex: 0 0 auto;
    margin: 0 auto;
}

.phone-slot {
    width: 300px;
    background: var(--shroom-frame);
    border-radius: var(--radius-device);
    padding: 11px;
    box-shadow: var(--shadow-device);
}

.phone-screen {
    aspect-ratio: 9 / 19.5;
    background: var(--surface-board);
    border-radius: var(--radius-screen);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: var(--text-soft);
    font-size: 13.5px;
    font-weight: var(--fw-medium);
    overflow: hidden;
}

.phone-screen.has-image { padding: 0; }
.phone-screen.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====================== Sections ====================== */
section {
    padding: clamp(56px, 8vw, 104px) 0;
}

.section-head {
    text-align: center;
    max-width: 34em;
    margin: 0 auto 52px;
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.6px;
    margin: 0 0 14px;
    text-wrap: balance;
}

.section-head p {
    font-size: 17px;
    color: var(--text-soft);
    line-height: 1.55;
    margin: 0;
    text-wrap: pretty;
}

/* ====================== Why us ====================== */
.why { background: var(--surface-card); border-top: 1px solid var(--shroom-border); border-bottom: 1px solid var(--shroom-border); }

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.why-card {
    background: var(--surface-app);
    border: 1px solid var(--shroom-border);
    border-radius: var(--radius-banner);
    padding: 26px;
}

.why-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--surface-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.why-icon svg { color: var(--accent); }

.why-card h3 {
    font-size: 17px;
    font-weight: var(--fw-semibold);
    margin: 0 0 7px;
}

.why-card p {
    font-size: 14.5px;
    color: var(--text-soft);
    line-height: 1.5;
    margin: 0;
}

/* ====================== Featured Shroomsweeper ====================== */
.featured { background: var(--surface-board); border-top: 1px solid var(--shroom-border); }

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

@media (min-width: 820px) {
    .featured-grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 72px); }
}

.featured-text { max-width: 36em; }

.featured-text h2 {
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.7px;
    margin: 0 0 18px;
    text-wrap: balance;
}

.featured-text > p {
    font-size: 17px;
    color: var(--text-soft);
    line-height: 1.6;
    margin: 0 0 26px;
    text-wrap: pretty;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.check-mark {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: var(--surface-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    color: var(--accent);
}

.check-text strong { font-weight: var(--fw-semibold); color: var(--text-strong); }
.check-text span { color: var(--text-soft); }

.screenshot-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.screenshot-slot {
    aspect-ratio: 9 / 19.5;
    background: var(--surface-card);
    border: 1px dashed var(--shroom-border);
    border-radius: var(--radius-banner);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    color: var(--text-soft);
    font-size: 13px;
    overflow: hidden;
}

.screenshot-slot.has-image { padding: 0; border-style: solid; }
.screenshot-slot.has-image img { width: 100%; height: 100%; object-fit: cover; }

/* ====================== Footer ====================== */
.site-footer {
    background: var(--shroom-frame);
    color: #E7E3D6;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(48px, 6vw, 76px) 28px 36px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand-block {
    flex: 1 1 280px;
    max-width: 360px;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand-row .brand-name { color: #F3EFE4; }

.footer-tagline {
    font-size: 14.5px;
    line-height: 1.6;
    color: #B7B3A4;
    margin: 0;
    max-width: 30em;
}

.footer-cols {
    display: flex;
    gap: 56px;
    flex-wrap: wrap;
}

.footer-col-label {
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: #85806F;
    margin-bottom: 16px;
}

.footer-col-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    font-size: 14.5px;
    color: #CFC9B8;
    white-space: nowrap;
}

.footer-col-list a:hover { color: #F3EFE4; }
.footer-col-list .muted { color: #85806F; }

.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #85806F;
}

/* ====================== Privacy page ====================== */
.privacy-page {
    padding: 56px 0 40px;
    max-width: 720px;
}

.privacy-page h1 {
    font-size: 2rem;
    margin: 0 0 8px;
    font-weight: var(--fw-bold);
}

.privacy-page .updated {
    color: var(--text-soft);
    margin: 0 0 32px;
    font-size: 0.95rem;
}

.privacy-page h2 {
    font-size: 1.25rem;
    margin: 32px 0 10px;
    font-weight: var(--fw-semibold);
}

.privacy-page p,
.privacy-page li {
    color: var(--text-strong);
    font-size: 1.02rem;
}

.privacy-page ul { padding-left: 22px; }
.privacy-page li + li { margin-top: 6px; }

.privacy-page a { color: var(--accent); }
.privacy-page a:hover { text-decoration: underline; }

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--accent);
    font-weight: var(--fw-medium);
    font-size: 0.95rem;
}

.back-link:hover { text-decoration: underline; }

/* ====================== Responsive ====================== */
@media (max-width: 720px) {
    .nav-right { gap: 14px; }
    .nav-link { display: none; }
    .hero-visual { order: 2; }
}

@media (max-width: 600px) {
    .container { padding: 0 20px; }
    .hero h1 { font-size: clamp(32px, 8vw, 44px); }
    .btn { height: 52px; font-size: 15px; padding: 0 22px; }
    .phone-slot { width: 260px; }
}
