/* GoSosh — minimal, readable, fast.
 *
 * Single stylesheet for the whole site. No build step beyond build.py
 * copying this file into ./build/.
 *
 * Design notes:
 * - System fonts so the site feels native on each platform
 * - Comfortable measure (45–75 chars per line) for actual reading
 * - One column, generous spacing, no sidebar, no popups
 * - Honest dark mode that follows the user's OS preference
 * - No JS required
 */

/* ---- Variables ---- */

/* Light theme — reverted to white background after dark theme made
 * the icon hard to see on the page (the icon's own near-black
 * backdrop blended into the dark page no matter how visible we
 * made the framing border). The light bg was the original working
 * design where the icon's orange radar design popped naturally.
 *
 * Dark-theme variables kept here commented in case we revisit
 * with a transparent/light-variant icon someday:
 *   --bg: #0d0d0e;   --fg: #f0ede8;   --fg-muted: #b0aca6;
 *   --fg-tertiary: #807c76;   --accent: #f08160;
 *   --accent-dark: #d65d3a;   --border: #2a2a2c;
 *   --surface: #18181a;   --code-bg: #1a1a1c;
 */
:root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --fg-muted: #5a5a5a;
    --fg-tertiary: #8a8a8a;
    --accent: #d65d3a;            /* GoSosh coral */
    --accent-dark: #b34a2c;
    --border: #e8e6e0;
    --surface: #faf8f5;            /* cream */
    --code-bg: #f4f1ec;

    --maxw: 42rem;
    --maxw-wide: 56rem;

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "New York", "Charter", "Georgia", "Iowan Old Style", serif;
}

/* ---- Reset / base ---- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Header / nav ---- */

.site-header {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    margin-bottom: 3rem;
}

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--maxw-wide);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;                 /* a touch more breathing room for 64px icon */
    font-size: 1.5rem;            /* bumped from 1.25 to balance bigger icon */
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.01em;
}

/* App icon next to the wordmark. Doubled from 32px to 64px per
 * Don's call so the brand reads more confidently on first glance.
 * iOS app-icon rounding (14px on a 64px tile is the iOS 16+ default
 * ratio) so the mark reads as "the app," not a generic square logo.
 *
 * The 1px inset highlight + soft drop shadow are deliberate on
 * dark backgrounds: an icon whose own backdrop is dark would
 * otherwise disappear into the page. The highlight gives it an
 * edge; the shadow lifts it. Both are barely perceptible on
 * light backgrounds, so this works either way. */
.brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    flex-shrink: 0;
    display: block;
    /* Light, conventional iOS app-icon presentation — barely-there
     * stroke + subtle drop shadow for visual weight against the
     * white page. The icon's own design carries the brand. */
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.primary-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.primary-nav a {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.primary-nav a:hover {
    color: var(--accent);
}

.primary-nav a[aria-current="page"] {
    color: var(--fg);
    font-weight: 600;
}

/* ---- Typography ---- */

main h1 {
    font-size: 2.5rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
    color: var(--fg);
}

main h2 {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 3rem 0 1rem;
    color: var(--fg);
}

main h3 {
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--fg);
}

main p {
    margin: 0 0 1.25rem;
    color: var(--fg);
}

main p strong {
    color: var(--fg);
    font-weight: 600;
}

main a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(214, 93, 58, 0.4);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease;
}

main a:hover {
    text-decoration-color: var(--accent);
}

main ul, main ol {
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
}

main li {
    margin-bottom: 0.4rem;
}

main blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    color: var(--fg-muted);
    font-style: italic;
}

main code {
    font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.92em;
    background: var(--code-bg);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

main pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

main pre code {
    background: none;
    padding: 0;
}

main hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

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

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    padding: 2.5rem 0;
    text-align: center;
}

.site-footer .tagline {
    color: var(--fg-muted);
    font-style: italic;
    margin-bottom: 1rem;
}

.site-footer .footer-links {
    margin-bottom: 0.5rem;
    color: var(--fg-tertiary);
}

.site-footer .footer-links a {
    color: var(--fg-muted);
    text-decoration: none;
    margin: 0 0.25rem;
}

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

/* Secondary footer row — legal / support links. Smaller,
 * less prominent than the primary content nav above. */
.site-footer .footer-links.legal {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.site-footer .footer-links.legal a {
    color: var(--fg-tertiary);
}

/* "More apps from Don's Tech →" cross-promo line. Subtle treatment
 * — dotted underline, muted color — so it reads as a footer nav
 * link rather than a content CTA. */
.site-footer .umbrella {
    margin: 0.5rem 0 0.8rem;
    font-size: 0.92rem;
    color: var(--fg-muted);
}

.site-footer .umbrella a {
    color: var(--fg-muted);
    text-decoration: none;
    border-bottom: 1px dotted var(--fg-tertiary);
    padding-bottom: 1px;
    transition: color 0.15s ease, border-bottom-color 0.15s ease;
}

.site-footer .umbrella a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.site-footer .copyright {
    color: var(--fg-tertiary);
    font-size: 0.85rem;
    margin: 0;
}

/* ---- Small screens ---- */

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }
    main h1 {
        font-size: 2rem;
    }
    main h2 {
        font-size: 1.35rem;
        margin-top: 2.5rem;
    }
    .container {
        padding: 0 1.25rem;
    }
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .primary-nav {
        gap: 1rem;
    }
}

/* ---- App Store badge (when added) ---- */

.appstore-badge {
    display: inline-block;
    margin: 1.5rem 0;
}

.appstore-badge img {
    height: 50px;
    width: auto;
    display: block;
}

/* Prominent download CTA — a coral pill, hard to miss, no image needed. */
.cta-download {
    display: inline-block;
    margin: 0;
    padding: 0.85rem 2rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1.08rem;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(214, 90, 58, 0.35);
    transition: background 0.15s ease, transform 0.08s ease;
}

.cta-download:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.cta-download-wrap {
    text-align: center;
    margin: 1.75rem 0;
}

/* ---- Demo video (How it works hub) ---- */

/* Portrait screen recording shown at phone width, centred. Rounded and
 * lightly framed so it reads as "the app on a phone" against the dark page.
 * Tap to play (no autoplay). */
.demo {
    margin: 1.75rem auto 2.25rem;
    max-width: 300px;
    text-align: center;
}

.demo video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
    background: #000;
}

.demo figcaption {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--fg-muted);
    line-height: 1.45;
}

/* Small coral pill marking a Plus-only feature in a heading. */
.plus-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
    padding: 0.1em 0.55em;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
}
