/* ===========================================================
   app-page.css — shared skeleton for the per-app pages.

   Every page under /apps/ loads this file and then overrides the
   theme tokens in its own <style> block, so the structure stays
   identical while the skin belongs entirely to the app.

   Tokens a page is expected to set:
     --bg, --bg-2, --surface, --surface-2, --line
     --ink, --ink-2, --ink-3
     --accent, --on-accent, --accent-soft
     --radius, --radius-lg, --font, --font-display
   =========================================================== */

/* The shell — app bar and footer — is set in the portfolio's Archivo, so every
   product page still reads as part of ramanouski.com; the page itself belongs to the app. */
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
    /* Neutral fallbacks — every page overrides these. */
    --bg: #ffffff;
    --bg-2: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #fbfbfd;
    --line: rgba(0, 0, 0, 0.1);
    --ink: #1d1d1f;
    --ink-2: #4b4b52;
    --ink-3: #77777e;
    --accent: #0C5A43;
    --on-accent: #ffffff;
    --accent-soft: rgba(12, 90, 67, 0.12);

    --radius: 14px;
    --radius-lg: 26px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font);

    --wrap: 980px;
    --shell-font: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --ease: cubic-bezier(0.28, 0, 0.49, 1);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -0.011em;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 22px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 18px;
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.skip-link:focus { top: 12px; }

/* ===========================================================
   App bar — deliberately quiet: the app owns the page
   =========================================================== */
.appbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
}

.appbar .wrap {
    height: 52px;
    font-family: var(--shell-font);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.appbar a {
    /* a 44px touch target inside the 52px bar, without changing how it looks */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 14px;
    letter-spacing: -0.01em;
    transition: color 0.25s var(--ease);
}

.appbar a:hover { color: var(--ink); }

.appbar-trail {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.appbar a.appbar-home {
    gap: 9px;
    color: var(--ink);
    font-weight: 700;
    font-stretch: 108%;
    letter-spacing: -0.015em;
}

.appbar-home img {
    width: 22px;
    height: 22px;
    flex: none;
}

.appbar-sep {
    color: var(--ink-3);
    font-size: 14px;
}

.appbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* three links plus the name must stay on one line on a 320px phone */
.appbar a {
    white-space: nowrap;
}

@media (max-width: 480px) {
    /* the monogram stays; the name is still read out, just not drawn */
    .appbar-home span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (max-width: 400px) {
    .appbar .wrap { gap: 10px; }
    .appbar-nav { gap: 12px; }
    .appbar a { font-size: 13px; }
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
    position: relative;
    padding: clamp(56px, 9vw, 104px) 0 clamp(44px, 7vw, 80px);
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 860px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }
}

.app-icon {
    width: clamp(88px, 14vw, 116px);
    height: clamp(88px, 14vw, 116px);
    border-radius: 23.5%;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 18px 44px -14px rgba(0, 0, 0, 0.34);
    margin-bottom: 26px;
}

/* macOS icons carry their own shape and shadow inside a transparent margin
   (the body is 154 of 192 px): no mask, no extra shadow, scaled so the body
   is as large as an iOS icon */
.app-icon.is-mac {
    border-radius: 0;
    box-shadow: none;
    transform: scale(1.25);
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7.4vw, 68px);
    line-height: 1.03;
    letter-spacing: -0.035em;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-sub {
    font-size: clamp(19px, 2.6vw, 24px);
    line-height: 1.35;
    color: var(--ink-2);
    letter-spacing: -0.02em;
    max-width: 22em;
    margin-bottom: 26px;
}

.hero-lede {
    font-size: 17px;
    line-height: 1.62;
    color: var(--ink-2);
    max-width: 34em;
    margin-bottom: 32px;
}

/* ===========================================================
   App Store button
   =========================================================== */
.store-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* The official badge, unmodified (App Store Marketing Guidelines): the black
   artwork with its grey border, at least 40px tall, a quarter of its height of
   clear space around it (the row gap), and no hover animation. */
.store-badge {
    display: inline-flex;
    border-radius: 9px;
}

.store-badge img {
    display: block;
    width: auto;
    height: 48px;
}

.store-note {
    font-size: 14px;
    color: var(--ink-3);
}

/* Used instead of the badge while an app is still in development: a status,
   not a button, and never the Apple logo. Same height as the badge. */
.store-soon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--line));
    background: transparent;
    color: var(--ink-2);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.store-soon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 550;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.ghost-btn:hover {
    border-color: var(--ink-3);
    background: var(--surface-2);
}

/* ===========================================================
   Fact chips
   =========================================================== */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    list-style: none;
}

.chips li {
    font-size: 13px;
    font-weight: 550;
    letter-spacing: -0.005em;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 13px;
}

/* ===========================================================
   Screenshots — the real App Store images, right under the hero
   =========================================================== */
.gallery-section {
    padding: clamp(28px, 5vw, 56px) 0 clamp(12px, 3vw, 24px);
}

.gallery {
    display: flex;
    gap: clamp(12px, 2vw, 20px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    list-style: none;
}

.gallery li {
    flex: none;
    scroll-snap-align: start;
}

.gallery img {
    width: auto;
    height: clamp(380px, 46vw, 540px);
    max-width: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

/* Mac windows: one large, two beside each other under it */
.gallery.is-wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
}

.gallery.is-wide li:first-child {
    grid-column: 1 / -1;
}

.gallery.is-wide img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

@media (max-width: 640px) {
    .gallery.is-wide {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===========================================================
   Sections
   =========================================================== */
.section {
    padding: clamp(52px, 8vw, 92px) 0;
}

.section-alt { background: var(--bg-2); }

.section-head {
    max-width: 40em;
    margin-bottom: clamp(30px, 4vw, 46px);
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 14px;
}

.section-head p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* Answer block — a short, quotable paragraph. Written so an assistant
   reading the page can lift a correct answer straight out of it. */
.answer {
    font-size: clamp(20px, 2.8vw, 26px);
    line-height: 1.5;
    letter-spacing: -0.022em;
    color: var(--ink);
    max-width: 26em;
}

.answer strong { font-weight: 650; }

/* ===========================================================
   Feature grid
   =========================================================== */
.features {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    list-style: none;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 24px 26px;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.feature:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.45);
}

.feature h3 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.018em;
    margin-bottom: 9px;
}

.feature p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
}

.feature-mark {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    margin-bottom: 18px;
    opacity: 0.9;
}

/* ===========================================================
   Screens / steps list
   =========================================================== */
.steps {
    display: grid;
    gap: 2px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--line);
}

.steps > li,
.steps > div {
    background: var(--surface);
    padding: 20px 24px;
    display: grid;
    gap: 4px 20px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 700px) {
    .steps > li,
    .steps > div { grid-template-columns: 190px minmax(0, 1fr); }
}

.steps dt,
.steps .step-name {
    font-weight: 650;
    font-size: 15px;
    letter-spacing: -0.015em;
}

.steps dd,
.steps .step-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* ===========================================================
   Privacy strip
   =========================================================== */
.strip {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: clamp(28px, 4vw, 44px);
}

.strip h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.4vw, 32px);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 14px;
    font-weight: 700;
}

.strip p {
    font-size: 17px;
    line-height: 1.62;
    color: var(--ink-2);
    max-width: 44em;
}

.strip-points {
    display: grid;
    gap: 14px 32px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-top: 26px;
    list-style: none;
}

.strip-points li {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
    padding-left: 22px;
    position: relative;
}

.strip-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
}

/* ===========================================================
   Tech tags
   =========================================================== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
}

.tags li {
    font-size: 13px;
    font-weight: 550;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 12px;
    background: var(--surface);
}

/* ===========================================================
   FAQ — <details>, so it works with no JavaScript at all
   =========================================================== */
.faq {
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 20px 44px 20px 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.018em;
    position: relative;
    transition: color 0.25s var(--ease);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary:hover { color: var(--accent); }

.faq summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -6px;
    border-right: 2px solid var(--ink-3);
    border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg);
    transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.faq details > div {
    padding: 0 0 22px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 46em;
}

.faq details > div p + p { margin-top: 12px; }

/* ===========================================================
   Closing CTA
   =========================================================== */
.closer {
    text-align: center;
    padding: clamp(60px, 9vw, 108px) 0;
}

.closer h2 {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.032em;
    font-weight: 700;
    margin-bottom: 16px;
}

.closer p {
    font-size: 18px;
    color: var(--ink-2);
    margin-bottom: 30px;
}

.closer .store-row { justify-content: center; }

/* ===========================================================
   Footer
   =========================================================== */
.foot {
    border-top: 1px solid var(--line);
    padding: 34px 0 46px;
    font-family: var(--shell-font);
    font-size: 14px;
    color: var(--ink-3);
}

.foot .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    align-items: center;
    justify-content: space-between;
}

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.foot-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.foot a {
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.25s var(--ease);
}

.foot a:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* required wherever the App Store badge is used */
.foot-legal {
    flex-basis: 100%;
    font-size: 12px;
    line-height: 1.5;
}

/* ===========================================================
   Shared stage helper — the box a page draws its signature
   visual into. Each page styles the contents itself.
   =========================================================== */
.stage {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .stage { will-change: transform; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
