/* ─────────────────────────────────────────────────────────────────────
   NotepadX — marketing site
   Black + orange, Apple-style typography, CSS-built editor mockups.
   ───────────────────────────────────────────────────────────────────── */

:root {
    /* surfaces */
    --bg:           #0a0a0a;
    --bg-tint:     #121212;
    --bg-quiet:    #0f0f0f;
    --surface:     #161618;
    --surface-2:   #1c1c1f;
    --border:       rgba(255, 255, 255, 0.07);
    --border-2:     rgba(255, 255, 255, 0.12);

    /* text */
    --fg:           #f5f5f7;
    --fg-soft:     #c7c7cc;
    --fg-muted:    #86868b;
    --fg-dim:      #6e6e73;

    /* accent (matches the editor's active-tab orange) */
    --accent:       #ff7a00;
    --accent-soft:  #ff9436;
    --accent-deep:  #c45c00;
    --accent-bg:    rgba(255, 122, 0, 0.10);

    /* editor mockup palette (matches the real app's vs2015-ish dark) */
    --code-bg:      #1e1e1e;
    --code-fg:      #d4d4d4;
    --code-kw:      #569cd6;
    --code-ty:      #4ec9b0;
    --code-fn:      #dcdcaa;
    --code-id:      #9cdcfe;
    --code-str:     #ce9178;
    --code-cm:      #6a9955;
    --md-h:         #6196cc;
    --md-h2:        #9cdcfe;

    /* gutters & rulers */
    --gutter-bg:    #181818;
    --gutter-fg:    #6b6b6b;
    --gutter-active: #d6d6d6;

    /* shape */
    --radius:       16px;
    --radius-sm:    10px;
    --radius-xs:    6px;

    /* type */
    --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Display",
             "SF Pro Text", "Helvetica Neue", "Helvetica", Arial,
             system-ui, sans-serif;
    --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo,
             "JetBrains Mono", "Courier New", monospace;
}

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

img { display: block; }

code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--fg-soft);
}

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

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 18px;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
    color: var(--fg);
}

/* ─────────────────────────────────────────────────────────────────────
   NAV
   ───────────────────────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.005em;
}
.nav-brand img { border-radius: 7px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-muted);
    transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--fg); }

.nav-cta {
    background: var(--accent);
    color: #1a0d00 !important;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
}
.nav-cta:hover {
    background: var(--accent-soft);
    color: #1a0d00 !important;
}

/* ─────────────────────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 80px 32px 100px;
    max-width: 1240px;
    margin: 0 auto;
    text-align: center;
    overflow: visible;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -40px 0 auto 0;
    height: 720px;
    background:
        radial-gradient(ellipse 60% 60% at 50% 0%,
            rgba(255, 122, 0, 0.18) 0%,
            transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.hero-text { max-width: 760px; margin: 0 auto 60px; }

.hero h1 {
    /* Sized to fit "The notepad you've been waiting for." on one
       line within the 760px hero column. 4vw ≈ 44px at 1100px,
       capped at 50px so it doesn't overshoot. white-space: nowrap
       so we never accidentally wrap. */
    font-size: clamp(26px, 4vw, 50px);
    margin-bottom: 24px;
    white-space: nowrap;
}
@media (max-width: 640px) {
    /* On phones the headline can wrap; nowrap would overflow the
       viewport. */
    .hero h1 { white-space: normal; }
}

.lede {
    font-size: clamp(17px, 1.7vw, 21px);
    color: var(--fg-soft);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.link-secondary {
    color: var(--fg-soft);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.link-secondary:hover { color: var(--accent); }

.hero-meta {
    color: var(--fg-dim);
    font-size: 13px;
    margin-top: 8px;
}

/* App Store button */
.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #fff;
    color: #000 !important;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 18px 40px -16px rgba(255, 122, 0, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-store:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px -18px rgba(255, 122, 0, 0.6);
}
.btn-store svg { color: #000; flex: none; }
.btn-store span {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}
.btn-store small {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 2px;
}
.btn-store strong {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #000;
}

.btn-store-large {
    padding: 18px 32px;
    border-radius: 14px;
}
.btn-store-large svg { width: 32px; height: 32px; }
.btn-store-large strong { font-size: 22px; }
.btn-store-large small { font-size: 11px; }

/* ─────────────────────────────────────────────────────────────────────
   SECTIONS — alternating row layouts
   ───────────────────────────────────────────────────────────────────── */
.section {
    padding: 120px 32px;
    max-width: 1240px;
    margin: 0 auto;
}
.section-tinted { background: var(--bg-tint); max-width: none; }
.section-tinted .row { max-width: 1240px; margin: 0 auto; }
.section-quiet { background: var(--bg-quiet); max-width: none; }
.section-quiet > * { max-width: 1240px; margin-left: auto; margin-right: auto; }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 72px;
}
.section-head h2 {
    font-size: clamp(32px, 4.4vw, 52px);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 72px;
    align-items: center;
}
.row-reverse .row-text { order: 2; }
.row-reverse .row-visual { order: 1; }

.row-text h2 {
    font-size: clamp(32px, 4.4vw, 52px);
    margin-bottom: 22px;
}
.row-text p {
    font-size: 17px;
    color: var(--fg-soft);
    line-height: 1.65;
    margin-bottom: 28px;
}

.check-list {
    list-style: none;
    color: var(--fg-soft);
    font-size: 16px;
    line-height: 1.7;
}
.check-list li {
    padding-left: 26px;
    position: relative;
    margin-bottom: 6px;
}
.check-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.6em;
    width: 16px; height: 9px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-50deg);
}

/* ─────────────────────────────────────────────────────────────────────
   EDITOR MOCKUP — pure CSS facsimile of the real app
   ───────────────────────────────────────────────────────────────────── */
.mock-window {
    background: var(--code-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow:
        0 50px 100px -30px rgba(0, 0, 0, 0.7),
        0 30px 60px -15px rgba(255, 122, 0, 0.15),
        inset 0 0 0 1px var(--border-2);
}
.mock-window-large {
    max-width: 1120px;
    margin: 0 auto;
}

.mock-titlebar {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #2c2c2e, #1f1f21);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    position: relative;
}
.dot {
    width: 12px; height: 12px;
    border-radius: 999px;
    margin-right: 8px;
    display: inline-block;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.mock-title {
    position: absolute;
    left: 50%; transform: translateX(-50%);
    font-size: 12px;
    color: #b4b4b8;
    font-weight: 500;
    letter-spacing: -0.005em;
}

.mock-tabbar {
    display: flex;
    align-items: stretch;
    background: #232325;
    border-bottom: 1px solid #161618;
    height: 30px;
}
.mock-gutter-spacer {
    width: 44px;
    background: var(--gutter-bg);
    border-right: 1px solid var(--border);
    flex: none;
}
.mock-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    font-size: 11.5px;
    color: var(--fg-muted);
    border-right: 1px solid #16161a;
    cursor: default;
    flex: none;
    min-width: 100px;
}
.mock-tab-active {
    background: var(--code-bg);
    color: var(--fg);
    position: relative;
}
.mock-tab-active::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: var(--accent);
}
.mock-tab-dot {
    width: 5px; height: 5px;
    background: var(--fg-muted);
    border-radius: 50%;
    display: inline-block;
}
.mock-tab-plus {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--fg-muted);
    font-size: 13px;
    flex: none;
}

.mock-split { display: flex; min-height: 360px; }
.mock-split-single .mock-preview { display: none; }
.mock-split-single .mock-editor { flex: 1; }

.mock-editor {
    flex: 1;
    display: flex;
    background: var(--code-bg);
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.65;
    overflow: hidden;
}
.mock-gutter {
    width: 44px;
    background: var(--gutter-bg);
    border-right: 1px solid var(--border);
    color: var(--gutter-fg);
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: none;
}
.mock-gutter span {
    padding: 0 10px;
    font-variant-numeric: tabular-nums;
    font-size: 10.5px;
    line-height: 1.65em;
    height: 1.65em;
}
.mock-gutter-active { color: var(--gutter-active); font-weight: 500; }

.mock-code {
    flex: 1;
    padding: 12px 16px;
    color: var(--code-fg);
    overflow-x: hidden;
}
.ml { white-space: pre; }
.mock-line-active {
    background: rgba(255, 255, 255, 0.04);
    margin: 0 -16px;
    padding: 0 16px;
}

/* syntax token colors */
.kw  { color: var(--code-kw); }
.ty  { color: var(--code-ty); }
.fn  { color: var(--code-fn); }
.id  { color: var(--code-id); }
.str { color: var(--code-str); }
.cm  { color: var(--code-cm); font-style: italic; }

/* markdown source token colors */
.md-h  { color: var(--md-h); font-weight: 700; }
.md-h2 { color: var(--md-h); font-weight: 700; }
.md-b  { color: var(--code-fg); font-weight: 700; }
.md-i  { color: var(--code-fg); font-style: italic; }

/* preview pane */
.mock-preview {
    flex: 1;
    background: #ffffff;
    color: #24292f;
    padding: 24px 32px;
    font-family: var(--sans);
    font-size: 13.5px;
    line-height: 1.55;
    border-left: 1px solid var(--border);
    overflow-y: auto;
}
.mock-prev-h1 {
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 1px solid #d0d7de;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.mock-prev-h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 18px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d0d7de;
}
.mock-preview p { margin-bottom: 10px; }
.mock-prev-ul {
    list-style: disc;
    padding-left: 22px;
    margin-bottom: 10px;
}
.mock-prev-ul li { margin-bottom: 4px; }

.mock-prev-tbl {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 14px;
    font-size: 13px;
}
.mock-prev-tbl th, .mock-prev-tbl td {
    border: 1px solid #d0d7de;
    padding: 5px 10px;
    text-align: left;
}
.mock-prev-tbl th { background: #f6f8fa; font-weight: 600; }
.mock-prev-tbl tr:nth-child(even) td { background: #f6f8fa; }

/* ─────────────────────────────────────────────────────────────────────
   THREE-UP DETAIL GRID
   ───────────────────────────────────────────────────────────────────── */
.grid-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.grid-three article {
    padding: 6px 4px 6px 26px;
    border-left: 1px solid var(--border-2);
}
.grid-three h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--fg);
}
.grid-three p {
    color: var(--fg-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────────
   PHILOSOPHY
   ───────────────────────────────────────────────────────────────────── */
.philosophy {
    padding: 32px 0;
    text-align: center;
}
.philosophy h2 {
    font-size: clamp(32px, 4.4vw, 52px);
    margin-bottom: 48px;
}
.philosophy-list {
    max-width: 640px;
    margin: 0 auto 48px;
    text-align: left;
}
.philosophy-list dt {
    color: var(--fg);
    font-weight: 600;
    font-size: 17px;
    margin-top: 22px;
    margin-bottom: 4px;
}
.philosophy-list dt:first-child { margin-top: 0; }
.philosophy-list dd {
    color: var(--fg-muted);
    font-size: 15px;
    line-height: 1.6;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.philosophy-list dd:last-child { border-bottom: none; padding-bottom: 0; }

.philosophy-line {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--accent);
    font-style: italic;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────
   DOWNLOAD SECTION
   ───────────────────────────────────────────────────────────────────── */
.section-download {
    padding: 140px 32px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 50%, var(--accent-bg), transparent 60%),
        var(--bg);
    max-width: none;
}
.section-download h2 {
    font-size: clamp(36px, 5vw, 60px);
    margin-bottom: 18px;
}
.download-blurb {
    color: var(--fg-muted);
    font-size: 18px;
    margin-bottom: 40px;
}
.download-meta {
    margin-top: 28px;
    color: var(--fg-dim);
    font-size: 13px;
}

/* ─────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px;
}
.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}
.footer-brand img { border-radius: 6px; }
.footer-copy {
    color: var(--fg-dim);
    font-size: 13px;
}

/* ─────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
    .row {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .row-reverse .row-text { order: 1; }
    .row-reverse .row-visual { order: 2; }
}

@media (max-width: 640px) {
    .nav { padding: 14px 20px; }
    .nav-links { gap: 16px; }
    .nav-links a:not(.nav-cta) { display: none; }

    .hero { padding: 60px 20px 70px; }
    .section { padding: 80px 20px; }
    .section-download { padding: 90px 20px; }

    .mock-split { flex-direction: column; min-height: auto; }
    .mock-preview { border-left: none; border-top: 1px solid var(--border); }

    .grid-three article { padding-left: 18px; }
}
