/* ============================================================
   Barn Burner — site styles
   Matches the app: Righteous brand type, rounded UI (Nunito ≈
   SF Rounded), SF-Mono-style clock digits, orange work / cyan
   rest, dark cards, capsule buttons, tvOS focus states.
   ============================================================ */

:root {
    --bg: #070708;
    --card: rgba(22, 22, 26, 0.65);
    --work: #ff9500;             /* SwiftUI .orange */
    --work-glow: rgba(255, 149, 0, 0.45);
    --rest: #32ade6;             /* SwiftUI .cyan */
    --rest-glow: rgba(50, 173, 230, 0.35);
    --text: #f5f5f7;
    --muted: #86868b;
    --line: rgba(255, 255, 255, 0.08);
    --brand-font: 'Righteous', cursive;
    --ui-font: 'Nunito', -apple-system, 'SF Pro Rounded', sans-serif;
    --mono-font: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--ui-font);
    font-weight: 600;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

#bg-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Same trick as the app's TimerView: art, then black at 60% */
.hero-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ---------- Nav ---------- */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--brand-font);
    font-size: 1.9rem;
    color: var(--work);
    text-decoration: none;
    text-shadow: 0 0 18px var(--work-glow);
    letter-spacing: 1px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    margin-left: 28px;
    font-weight: 700;
    font-size: 0.95rem;
    opacity: 0.85;
}
.nav-links a:hover { color: var(--work); opacity: 1; }

/* ---------- Hero content ---------- */

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
    flex: 1;
    padding: 48px 0 64px;
}

.platform-pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--work);
    border: 2px solid var(--work);
    background: rgba(255, 149, 0, 0.15);
    border-radius: 999px;
    padding: 6px 18px;
    margin-bottom: 26px;
}

.hero h1 {
    font-family: var(--brand-font);
    font-weight: 400;
    font-size: clamp(2.6rem, 5vw, 4rem);
    line-height: 1.08;
    letter-spacing: 1px;
    margin-bottom: 22px;
    color: #fff;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
}

.tagline {
    font-size: 1.15rem;
    color: var(--muted);
    font-weight: 600;
    max-width: 34em;
    margin-bottom: 34px;
}

.hero-actions { display: flex; align-items: center; gap: 18px; }

/* Orange capsule, like START WORKOUT / PAUSE in the app */
.btn-store {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    background: var(--work);
    color: #000;
    text-decoration: none;
    border-radius: 999px;
    padding: 14px 38px;
    box-shadow: 0 10px 30px var(--work-glow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-store span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.75;
}
.btn-store strong { font-size: 1.25rem; font-weight: 800; }
.btn-store:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 38px var(--work-glow); }

.price-note {
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 34em;
}

/* ---------- Hero demo (the timer face) ---------- */

.hero-demo {
    text-align: center;
    padding: 36px 20px;
    user-select: none;
}

.demo-mode {
    font-family: var(--brand-font);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 22px;
    letter-spacing: 1px;
}

/* The ROUND pill, straight from RoundIndicatorView */
.round-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 26px;
    border-radius: 999px;
    border: 2px solid var(--work);
    background: rgba(255, 149, 0, 0.15);
    margin-bottom: 26px;
    transition: border-color 0.4s ease, background 0.4s ease;
}
.round-pill .round-word {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--work);
    transition: color 0.4s ease;
}
.round-pill .round-count { font-size: 1.25rem; font-weight: 800; color: #fff; }
.round-pill.rest { border-color: var(--rest); background: rgba(50, 173, 230, 0.15); }
.round-pill.rest .round-word { color: var(--rest); }

.demo-clock {
    font-family: var(--mono-font);
    font-weight: 800;
    font-size: clamp(4.2rem, 9vw, 7rem);
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--work);
    text-shadow: 0 10px 20px var(--work-glow);
    font-variant-numeric: tabular-nums slashed-zero;
    font-feature-settings: 'zero' 1;
    margin-bottom: 30px;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}
.demo-clock.rest { color: var(--rest); text-shadow: 0 10px 20px var(--rest-glow); }

/* Gray capsule, like Back / PAUSE / RESET on tvOS */
.capsule-btn {
    font-family: var(--ui-font);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text);
    background: rgba(255, 255, 255, 0.14);
    border: none;
    border-radius: 999px;
    padding: 12px 36px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.capsule-btn:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.04); }

.demo-note {
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Sections ---------- */

.section-title {
    font-family: var(--brand-font);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.section-title.left { text-align: left; }

.section-subtitle {
    color: var(--muted);
    text-align: center;
    font-size: 1.05rem;
    margin: 0 auto 56px;
    max-width: 620px;
}

/* ---------- Modes grid (the app's home screen) ---------- */

.modes-section { padding: 96px 0; }

.modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.mode-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 34px 24px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover = the tvOS focus state from the home screen */
.mode-card:hover {
    transform: scale(1.03);
    background: rgba(255, 149, 0, 0.16);
    border-color: rgba(255, 149, 0, 0.55);
    box-shadow: 0 14px 34px rgba(255, 149, 0, 0.18);
}

.mode-icon {
    width: 44px;
    height: 44px;
    stroke: var(--work);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 16px;
}

.mode-card h3 {
    font-family: var(--brand-font);
    font-weight: 400;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.mode-card p { color: var(--muted); font-size: 0.92rem; }

/* Padlock on locked modes, same corner as the app */
.mode-card.locked::after {
    content: '';
    position: absolute;
    right: 16px;
    bottom: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.55;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2386868b'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 1 1 6 0v3H9z'/%3E%3C/svg%3E");
}

/* ---------- Details (art & sound) ---------- */

.details-section {
    padding: 88px 0;
    border-top: 1px solid var(--line);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.detail .section-title { margin-bottom: 18px; }
.detail p { color: var(--muted); font-size: 1.02rem; }

/* ---------- Everyday details ---------- */

.features-section {
    padding: 88px 0;
    border-top: 1px solid var(--line);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Same card treatment as the mode grid, left-aligned for longer copy. */
.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px 26px;
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 149, 0, 0.4);
    box-shadow: 0 14px 34px rgba(255, 149, 0, 0.12);
}

.feature-card h3 {
    font-family: var(--brand-font);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--work);
    margin-bottom: 10px;
    letter-spacing: 0.4px;
}

.feature-card p { color: var(--muted); font-size: 0.96rem; }
.feature-card em { color: var(--text); font-style: normal; font-weight: 800; }

/* ---------- Screenshot galleries ---------- */

.screenshots-section {
    padding: 96px 0;
    border-top: 1px solid var(--line);
}

.screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 36px;
}

.screenshot-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.screenshot-container:hover {
    transform: scale(1.02);
    border-color: rgba(255, 149, 0, 0.5);
    box-shadow: 0 12px 28px rgba(255, 149, 0, 0.15);
}

.screenshot-container img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.screenshot-container .caption,
.device-shot .caption {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 12px;
    font-weight: 700;
}

/* Device (iPhone / iPad) galleries */
.device-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 36px;
    margin-top: 40px;
}

.device-shot { text-align: center; transition: transform 0.3s ease; }

.device-shot img {
    display: block;
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.device-shot.phone img { width: 230px; max-width: 60vw; }
.device-shot.tablet img { width: 360px; max-width: 80vw; }

.device-shot:hover { transform: translateY(-6px); }
.device-shot:hover img {
    border-color: var(--work);
    box-shadow: 0 18px 48px rgba(255, 149, 0, 0.28);
}

/* ---------- Support & privacy ---------- */

.support-section {
    padding: 96px 0;
    border-top: 1px solid var(--line);
    background: rgba(22, 22, 26, 0.2);
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 72px;
}

.support-info h2, .privacy-info h2 {
    font-family: var(--brand-font);
    font-weight: 400;
    font-size: 2rem;
    margin-bottom: 18px;
}

.support-info p, .privacy-info p {
    color: var(--muted);
    font-size: 1.02rem;
    margin-bottom: 22px;
}

.support-email {
    display: inline-block;
    color: var(--rest);
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: 26px;
}
.support-email:hover { border-bottom-color: var(--rest); }

.note {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--work);
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
}
.note p { margin: 0; font-size: 0.9rem; }

.privacy-info ul { list-style: none; margin-bottom: 22px; }
.privacy-info ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 14px;
    color: var(--muted);
}
.privacy-info ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--work);
    font-weight: 800;
}
.privacy-footnote { font-size: 0.9rem; font-style: italic; }

/* ---------- Footer ---------- */

.footer {
    padding: 36px 0;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 12px; padding-bottom: 40px; }
    .hero-demo { padding-top: 8px; }
    .modes-grid { grid-template-columns: repeat(2, 1fr); }
    .details-grid { grid-template-columns: 1fr; gap: 48px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .nav-links a { margin-left: 16px; font-size: 0.85rem; }
    .modes-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .support-grid { grid-template-columns: 1fr; gap: 56px; }
}
