/* Inkrule website. Idea: an editor's proof sheet. Ink on ruled paper; orange is only for corrections
   (and the brand mark); green is only for "checked". One bold thing: the live proof sheet in the hero. */

:root {
    --paper: #F6F8FD;
    --paper-2: #EDF1FA;
    --rule: #D3DEF2;
    --margin: #FFC6B3;
    --ink: #1A2340;
    --ink-soft: #4E5A7A;
    --ink-faint: #8B95B0;
    --orange: #FF6633;
    --orange-deep: #CC5229;
    --green: #178A5C;
    --band: #1A2340;
    --band-text: #E9EDF8;

    --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --hand: "Caveat", "Bradley Hand", cursive;

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --line: 34px; /* the ruled-paper line height */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-optical-sizing: auto;
    font-size: 18px;
    line-height: 1.55;
}

a { color: inherit; }
img { display: block; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 750; max-width: 18ch; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

kbd {
    display: inline-block;
    min-width: 1.7em;
    padding: 0 0.42em;
    border: 1.5px solid var(--ink);
    border-bottom-width: 3px;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: 650 0.82em/1.55 var(--sans);
    text-align: center;
    vertical-align: 0.06em;
}

/* Buttons: ink, never black text on orange */
.btn {
    display: inline-block;
    padding: 0.85em 1.4em;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 0 var(--orange-deep);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--orange); }
.btn-small { padding: 0.55em 1.05em; font-size: 0.92rem; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1.5px var(--ink), 0 3px 0 var(--orange); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--orange); }
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #5A6588; }
.btn-outline-light:hover { box-shadow: inset 0 0 0 1.5px #fff, 0 3px 0 var(--orange); }
.link { background: none; border: 0; padding: 0; color: var(--ink-soft); font: inherit; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); }

/* Header */
.top {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; gap: 28px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.2rem; text-decoration: none; }
.brand img { border-radius: 9px; }
.top nav { display: flex; gap: 22px; margin-left: auto; font-size: 0.95rem; }
.top nav a { text-decoration: none; color: var(--ink-soft); }
.top nav a:hover { color: var(--ink); }

/* Sections share one 1160 px column: the padding grows on wide screens, so every block starts at the same left edge */
section {
    padding-block: clamp(64px, 9vw, 120px);
    padding-inline: max(clamp(16px, 5vw, 64px), calc((100% - 1160px) / 2));
}

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: clamp(40px, 6vw, 88px); }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.4rem); font-weight: 800; letter-spacing: -0.035em; max-width: 12ch; }
.lede { margin-top: 26px; font-size: clamp(1.08rem, 1.5vw, 1.28rem); color: var(--ink-soft); max-width: 36ch; }
.lede em { font-style: normal; color: var(--ink); font-weight: 650; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.fine { margin-top: 18px; font-size: 0.9rem; color: var(--ink-faint); }

/* The proof sheet */
.sheet { margin: 0; position: relative; }
.sheet-tabs { display: flex; gap: 6px; padding-left: 26px; position: relative; z-index: 1; flex-wrap: wrap; }
.sheet-tabs button {
    font: 600 0.88rem var(--sans);
    color: var(--ink-soft);
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    padding: 8px 14px 7px;
    cursor: pointer;
    margin-bottom: -1px;
}
.sheet-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }
.paper {
    position: relative;
    background-color: #fff;
    background-image:
        linear-gradient(to right, transparent 62px, var(--margin) 62px, var(--margin) 64px, transparent 64px),
        repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px), var(--rule) var(--line));
    background-position: 0 0, 0 22px;
    border: 1px solid var(--rule);
    border-radius: 4px var(--r-md) var(--r-md) var(--r-md);
    padding: 54px 30px 40px 84px;
    min-height: 260px;
    box-shadow: 0 1px 0 var(--rule), 0 24px 48px -28px rgba(26, 35, 64, 0.35);
    transform: rotate(-0.6deg);
}
.press { position: absolute; top: 14px; right: 18px; display: flex; gap: 4px; opacity: 0.25; transition: opacity 0.2s, transform 0.12s; }
.press.on { opacity: 1; transform: translateY(2px); }
.proof {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: var(--line);
    font-weight: 500;
    color: var(--ink);
    padding-top: 2px;
}
.proof code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: var(--paper-2); padding: 0 0.25em; border-radius: 4px; }
.proof .fix { white-space: nowrap; }
.proof .del { position: relative; color: var(--ink); transition: color 0.3s; }
.proof .del::after {
    content: ""; position: absolute; left: -2px; right: -2px; top: 54%;
    height: 2.5px; background: var(--orange); border-radius: 2px;
    transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.proof .del.on { color: var(--ink-faint); }
.proof .del.on::after { transform: scaleX(1); }
.proof .ins {
    font-family: var(--hand); font-weight: 700; color: var(--orange-deep);
    font-size: 1.32em; line-height: 0; vertical-align: 0.42em;
    display: inline-block; opacity: 0; transform: translateY(4px) rotate(-3deg);
    transition: opacity 0.3s ease, transform 0.3s ease; margin: 0 0.06em;
}
.proof .ins.on { opacity: 1; transform: translateY(0) rotate(-3deg); }
.proof.clean .del { display: none; }
.proof.clean .ins { font-family: var(--sans); font-weight: 500; color: var(--ink); font-size: 1em; vertical-align: 0; transform: none; opacity: 1; line-height: inherit; margin: 0; }

.receipt {
    list-style: none; margin: 18px 0 0 34px; padding: 18px 22px;
    background: #fff; border: 1px dashed var(--ink-faint); border-radius: var(--r-sm);
    width: min(100%, 420px); font-size: 0.95rem;
    transform: rotate(0.8deg);
}
.receipt li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s; }
.receipt li.on { opacity: 1; transform: none; }
.receipt li::before { content: "✓"; color: var(--green); font-weight: 800; }
.receipt .verdict { border-top: 1px dashed var(--rule); margin-top: 6px; padding-top: 10px; font-weight: 700; color: var(--green); }
.receipt .verdict::before { content: none; }
figcaption { display: flex; gap: 18px; margin: 14px 0 0 34px; }

/* Apps */
.apps h2 { max-width: none; }
.app-list {
    margin-top: 28px;
    font-size: clamp(1.7rem, 4.4vw, 3.4rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.18;
    color: var(--ink);
}
.app-list span { color: var(--ink-faint); font-weight: 500; }
.apps-note { margin-top: 26px; color: var(--ink-soft); max-width: 52ch; }

/* Rules */
.rules { display: grid; grid-template-columns: 1fr 0.9fr; gap: clamp(32px, 6vw, 88px); align-items: start; background: #fff; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.rules-copy > p { margin-top: 20px; color: var(--ink-soft); max-width: 46ch; }
.plain { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; max-width: 50ch; }
.plain li { padding-left: 26px; position: relative; color: var(--ink-soft); }
.plain li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 2.5px; background: var(--orange); border-radius: 2px; }
.plain strong { color: var(--ink); font-weight: 650; }
.stylesheet {
    position: relative;
    background: var(--paper);
    border: 1.5px solid var(--ink);
    border-radius: var(--r-lg);
    padding: 26px 26px 34px;
    box-shadow: 8px 8px 0 var(--ink);
}
.ss-row { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ss-row:last-of-type { border-bottom: 0; }
.ss-row h3 { font-size: 0.95rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; font-weight: 600; font-size: 0.95rem; }
.chips span.on { background: var(--ink); color: #fff; }
.swap { font-weight: 600; padding: 2px 0; }
.swap i { font-style: normal; font-weight: 400; color: var(--ink-faint); margin: 0 0.35em; }
.note { position: absolute; right: 18px; bottom: -44px; font: 700 1.6rem var(--hand); color: var(--orange-deep); transform: rotate(-4deg); }

/* How */
.steps { list-style: none; counter-reset: step; padding: 0; margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font: 700 2.4rem var(--hand); color: var(--orange-deep); line-height: 1; margin-bottom: 10px; }
.steps p { margin-top: 10px; color: var(--ink-soft); }
.aside { margin-top: 40px; color: var(--ink-soft); }

/* Models */
.models { background: var(--paper-2); }
.model-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1.5px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.model-grid article { padding: 28px 26px 32px; }
.model-grid article + article { border-left: 1.5px solid var(--ink); }
.model-grid article.lead { background: var(--ink); color: var(--band-text); }
.model-grid article.lead p { color: #C3CBE2; }
.model-grid article.lead .price-tag { color: #fff; }
.price-tag { margin: 8px 0 14px; font-weight: 650; color: var(--orange-deep); }
.model-grid p { color: var(--ink-soft); font-size: 0.98rem; }

/* Pricing */
.pricing { background: var(--band); color: var(--band-text); }
.pricing h2 { color: #fff; }
.sub { margin-top: 14px; color: #AEB7D3; }
.plans { margin-top: 48px; display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 20px; align-items: stretch; }
.plan { position: relative; border: 1.5px solid #3B4566; border-radius: var(--r-lg); padding: 28px 26px; display: flex; flex-direction: column; }
.plan h3 { color: #fff; }
.amount { margin: 12px 0 18px; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.amount small { font-size: 1rem; font-weight: 500; color: #AEB7D3; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: 0.97rem; color: #C9D0E6; }
.plan ul li::before { content: "✓"; color: #5FD3A2; font-weight: 800; margin-right: 10px; }
.plan strong { color: #fff; font-weight: 650; }
.plan .btn { margin-top: auto; text-align: center; }
.plan-pro { background: #222D52; border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.scribble { position: absolute; top: -26px; right: 22px; font: 700 1.7rem var(--hand); color: var(--orange); transform: rotate(-5deg); }
.packs li { display: flex; justify-content: space-between; border-bottom: 1px dashed #3B4566; padding-bottom: 8px; }
.packs li::before { content: none !important; }
.packs b { color: #fff; }
.small { font-size: 0.88rem; color: #AEB7D3; }

/* FAQ */
.faq h2 { margin-bottom: 30px; }
.faq details { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 650; font-size: 1.12rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; font-weight: 400; color: var(--orange-deep); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-soft); max-width: 68ch; }

/* Notify */
.notify { text-align: center; }
.notify h2 { margin: 0 auto; max-width: 20ch; }
.notify p { margin: 18px auto 30px; color: var(--ink-soft); max-width: 46ch; }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 32px clamp(16px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; font-size: 0.92rem; color: var(--ink-soft); }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 750; color: var(--ink); }
.foot-brand img { border-radius: 7px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot p { margin-left: auto; }

/* Narrow screens */
@media (max-width: 960px) {
    .hero, .rules { grid-template-columns: 1fr; }
    .plans, .model-grid, .steps { grid-template-columns: 1fr; }
    .model-grid article + article { border-left: 0; border-top: 1.5px solid var(--ink); }
    .top nav { display: none; }
    .top .btn-small { margin-left: auto; }
    .scribble { right: 16px; }
}
@media (max-width: 520px) {
    body { font-size: 17px; }
    .paper { padding: 50px 18px 30px 46px; transform: none; background-image:
        linear-gradient(to right, transparent 32px, var(--margin) 32px, var(--margin) 34px, transparent 34px),
        repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px), var(--rule) var(--line)); }
    .sheet-tabs { padding-left: 8px; }
    .receipt { margin-left: 0; transform: none; }
    figcaption { margin-left: 0; }
    .foot p { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .proof .del::after, .proof .ins, .receipt li, .press, .btn { transition: none; }
}
