/* Enter — RPN Calculator
   The palette is lifted from the app's own Theme.swift, so the site and the
   app cannot drift apart. Everything here is local: no web fonts, no CDNs,
   no analytics — the privacy page would be a lie otherwise. */

:root {
    --bg:        #eff0f4;
    --panel:     #ffffff;
    --border:    #dadbe2;
    --text:      #14161a;
    --dim:       #6f747e;
    --blue:      #285ac9;
    --orange:    #ce5c08;
    --key:       #e0e1e7;
    --shadow:    rgba(0, 0, 0, 0.10);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #0b0c0e;
        --panel:     #191c20;
        --border:    #2e3237;
        --text:      #ebf2f1;
        --dim:       #8a9698;
        --blue:      #2e60ce;
        --orange:    #f68c2b;
        --key:       #2e3034;
        --shadow:    rgba(0, 0, 0, 0.5);
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

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

header.site {
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

header.site .wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

header.site img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

header.site .name {
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-right: auto;
}

header.site a {
    color: var(--dim);
    text-decoration: none;
    font-size: 15px;
}

header.site a:hover { color: var(--text); }

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

.hero {
    text-align: center;
    padding: 72px 0 8px;
}

.hero img.icon {
    width: 128px;
    height: 128px;
    border-radius: 28px;
    /* The icon is a keycap on a dark body, which all but vanishes against a
       dark page. A hairline gives the squircle back its edge. */
    border: 1px solid var(--border);
    box-shadow: 0 12px 34px var(--shadow);
}

.hero h1 {
    font-size: 44px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 28px 0 10px;
}

.hero p.tagline {
    font-size: 21px;
    color: var(--dim);
    margin: 0 auto;
    max-width: 30em;
}

.badges {
    margin: 34px 0 0;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 26px;
    border-radius: 12px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22);
    transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.badge:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.price {
    color: var(--dim);
    font-size: 15px;
}

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

main { padding-bottom: 40px; }

section { padding: 44px 0; }

h2 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--dim);
    font-weight: 600;
    margin: 0 0 22px;
}

h3 {
    font-size: 19px;
    letter-spacing: -0.01em;
    margin: 32px 0 8px;
}

p { margin: 0 0 16px; }

a { color: var(--blue); }

/* ---- Feature grid ---- */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.feature {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 20px 18px;
}

.feature h4 {
    margin: 0 0 6px;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.feature p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--dim);
}

/* ---- Screenshots ---- */

/* A grid rather than a scroller: four narrow shots fit the column exactly,
   so there is no horizontal scrollbar to explain. */
.shots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.shots figure { margin: 0; }

.shots img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.shots figcaption {
    font-size: 13px;
    line-height: 1.4;
    color: var(--dim);
    margin-top: 10px;
    text-align: center;
}

/* The Mac window is captured with its own rounded corners and shadow in the
   alpha channel, so it wants no frame of its own — just room to sit in. */
.mac {
    display: flex;
    gap: 34px;
    align-items: flex-start;
}

.mac-text { flex: 1 1 auto; }

.mac-text p:last-child { margin-bottom: 0; }

.mac-shot {
    flex: 0 0 auto;
    width: 240px;
    height: auto;
    display: block;
}

@media (max-width: 640px) {
    .mac { flex-direction: column; align-items: center; }
    .mac-shot { width: 220px; }
}

/* ---- The RPN explainer ---- */

.keystrokes {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 20px;
    margin: 0 0 18px;
    overflow-x: auto;
}

.keystrokes table {
    border-collapse: collapse;
    width: 100%;
    font-size: 16px;
}

.keystrokes td {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.keystrokes tr:last-child td { border-bottom: none; }

.keystrokes td:last-child {
    text-align: right;
    color: var(--dim);
    font-size: 15px;
}

kbd {
    display: inline-block;
    background: var(--key);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 2px 8px;
    margin-right: 5px;
    font: 500 14px/1.5 ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
    color: var(--text);
}

kbd.enter {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* ---- Support: FAQ ---- */

details {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 18px;
    margin-bottom: 10px;
}

summary {
    cursor: pointer;
    padding: 15px 0;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

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

summary::before {
    content: "+";
    color: var(--orange);
    font-weight: 600;
    width: 12px;
    flex: 0 0 12px;
}

details[open] summary::before { content: "\2212"; }

details .body {
    padding: 0 0 6px 22px;
    color: var(--dim);
    font-size: 16px;
}

details .body p:last-child { margin-bottom: 14px; }

/* ---- Contact card ---- */

.contact {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 26px;
}

.contact p:last-child { margin-bottom: 0; }

.contact .email {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    word-break: break-all;
}

/* ---- Legal copy ---- */

.legal h3 { margin-top: 34px; }

.legal ul { padding-left: 22px; margin: 0 0 16px; }

.legal li { margin-bottom: 8px; }

.updated {
    color: var(--dim);
    font-size: 15px;
}

.callout {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 12px;
    padding: 18px 22px;
    margin: 0 0 26px;
}

.callout p:last-child { margin-bottom: 0; }

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

footer.site {
    border-top: 1px solid var(--border);
    padding: 30px 0 60px;
    color: var(--dim);
    font-size: 15px;
}

footer.site .wrap {
    display: flex;
    gap: 8px 20px;
    flex-wrap: wrap;
    align-items: baseline;
}

footer.site .copy { margin-right: auto; }

footer.site a { color: var(--dim); text-decoration: none; }

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

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

@media (max-width: 560px) {
    .hero { padding-top: 48px; }
    .hero h1 { font-size: 36px; }
    .hero p.tagline { font-size: 19px; }
    .wrap { padding: 0 20px; }
    .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
