/* AngiLabs — focused, real, human
   Less is more. Real content over gimmicks.
   Instrument Serif (italic display) + Inter (body)
*/

:root {
    --ink: #0F172A;
    --ink-2: #1E293B;
    --paper: #FAFAF7;
    --paper-2: #F1F0EB;
    --line: #E5E5E5;
    --line-2: #D4D4D4;
    --muted: #525252;
    --muted-2: #737373;
    --accent: #E25822;
    --accent-d: #B8451B;
    --success: #16a34a;
    --warning: #d97706;
    --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', monospace;
    --max: 1200px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
}

[data-theme="dark"] {
    --ink: #FAFAF7;
    --paper: #0F172A;
    --paper-2: #1E293B;
    --line: #1E293B;
    --muted: #A3A3A3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
    margin: 0; padding: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "kern";
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
em { font-style: italic; }
.muted { color: var(--muted); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { left: 0; top: 0; z-index: 999; }

.read-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: var(--accent); z-index: 1000; transition: width 0.1s linear; }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    color: var(--ink);
}
h1 {
    font-style: italic;
    font-size: clamp(48px, 7vw, 104px);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.025em;
    margin: 0 0 32px;
}
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(32px, 4vw, 56px); font-style: italic; }
h3 { font-size: 20px; font-weight: 500; font-family: var(--sans); }
p { margin: 0 0 16px; color: var(--muted); max-width: 60ch; font-size: 16px; line-height: 1.6; }

::selection { background: var(--accent); color: #fff; }
::-moz-selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ─── HEADER ─────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s var(--ease);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 26px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.nav-main { display: flex; gap: 32px; align-items: center; }
.nav-main > a { color: var(--muted); font-weight: 500; font-size: 14.5px; transition: color 0.2s var(--ease); }
.nav-main > a:hover { color: var(--ink); }

/* ─── BUTTONS ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14.5px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--sans);
    transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }

/* ─── HERO ──────────────────────────────────── */
.hero {
    padding: 80px 0 100px;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.hero-kicker {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin: 0 0 32px;
}
.hero-title { max-width: 14ch; }
.hero-lede {
    font-size: 19px;
    line-height: 1.55;
    color: var(--muted);
    max-width: 620px;
    margin: 0 0 40px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-fineprint {
    font-size: 13px;
    color: var(--muted-2);
    margin: 0;
}

/* The hand-drawn illustration */
.hero-illust {
    position: absolute;
    right: -4%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    max-width: 600px;
    pointer-events: none;
    opacity: 0.95;
}
.hero-illust svg { width: 100%; height: auto; }

/* ─── SECTION CHROME ────────────────────────── */
.section-head {
    max-width: 720px;
    margin: 0 auto 64px;
    text-align: center;
}
.section-eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 4px 10px;
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: 999px;
}
.section-head h2 { margin-top: 0; }
.section-lede {
    font-size: 18px;
    color: var(--muted);
    max-width: 580px;
    margin: 0 auto;
}

/* ─── HOW IT WORKS ────────────────────────── */
#how { padding: 100px 0; }
.how-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}
.how-list li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 32px;
    padding: 40px 0;
    border-bottom: 1px solid var(--line);
    align-items: start;
}
.how-num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 48px;
    color: var(--accent);
    line-height: 1;
}
.how-list h3 { margin: 0 0 8px; }
.how-list p { margin: 0; }

/* ─── 3D SHOWCASE ──────────────────────────── */
.showcase-wrap {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: center;
    max-width: var(--max);
    margin: 0 auto 100px;
    padding: 0 28px;
}
.showcase-meta { max-width: 420px; }
.showcase-kicker {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin: 0 0 16px;
}
.showcase-meta h3 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}
.showcase-note {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}
.showcase-3d {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    cursor: crosshair;
}
.showcase-3d canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.showcase-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-2);
    background: color-mix(in srgb, var(--paper) 80%, transparent);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
@media (max-width: 960px) {
    .showcase-wrap { grid-template-columns: 1fr; gap: 32px; }
    .showcase-3d { aspect-ratio: 1 / 1; }
}

/* ─── DEMO WIDGET ──────────────────────────── */
#demo { padding: 100px 0; background: var(--paper-2); }
.demo-widget {
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}
.demo-tabs {
    display: flex;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    background: #FAFAF7;
    gap: 2px;
}
.demo-tab {
    flex: 1;
    background: transparent;
    border: none;
    font-family: var(--sans);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted-2);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.demo-tab:hover { color: var(--ink); }
.demo-tab.active { background: var(--ink); color: #fff; }

.demo-body { padding: 36px 40px 40px; }
.demo-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
.demo-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-2);
    margin: 0 0 6px;
}
.demo-title { font-family: var(--serif); font-style: italic; font-size: 28px; font-weight: 400; margin: 0; }
.demo-status { font-family: var(--mono); font-size: 11px; color: var(--muted-2); padding-top: 6px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 24px; }
.demo-grid > div { padding: 20px 24px; border-top: 1px solid var(--line); }
.demo-grid > div:first-child { padding-left: 0; }
.demo-grid > div:last-child { padding-right: 0; }
.kpi-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin: 0 0 10px; }
.kpi-value { font-family: var(--serif); font-style: italic; font-size: 42px; font-weight: 400; line-height: 1; margin: 0 0 6px; }
.kpi-delta { font-size: 12.5px; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 4px; }
.kpi-delta.kpi-up { color: var(--success); }
.kpi-delta.kpi-warn { color: var(--warning); }
.demo-chart { width: 100%; height: 100px; display: block; margin: 16px 0 24px; }
.demo-findings { list-style: none; padding: 20px 0 0; margin: 0; border-top: 1px solid var(--line); }
.demo-findings li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--ink); }
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.kpi-dot.kpi-up { background: var(--success); }
.kpi-dot.kpi-warn { background: var(--warning); }

/* ─── PRICING ──────────────────────────────── */
#pricing { padding: 100px 0; }
.price-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.price-row {
    padding: 40px 32px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: background 0.3s var(--ease);
}
.price-row:last-child { border-right: 0; }
.price-row:hover { background: var(--paper-2); }
.price-row h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 26px; }
.price-row p { margin: 0; }
.price-row p:not(.price-sub) { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.price-row .btn { margin-top: 16px; align-self: flex-start; }
.price-amount { font-family: var(--serif); font-style: italic; font-size: 40px; line-height: 1; margin: 0 0 4px; }
.price-amount small { font-size: 16px; color: var(--muted); font-weight: 400; }
.price-sub { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); margin: 0 0 8px !important; }
.price-tag {
    position: absolute;
    top: -10px;
    left: 32px;
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
}
.price-featured { background: var(--ink); color: #fff; }
.price-featured h3, .price-featured p, .price-featured .price-amount, .price-featured .price-sub, .price-featured small { color: #fff; }
.price-featured .btn-primary { background: var(--accent); }
.price-featured .btn-primary:hover { background: var(--ink); }
.price-featured:hover { background: var(--ink-2); }

/* ─── TESTIMONIAL ─────────────────────────── */
#testimonial { padding: 100px 0; background: var(--paper-2); }
.quote {
    margin: 0;
    padding: 0;
    text-align: left;
}
.quote blockquote { margin: 0 0 32px; }
.quote blockquote p {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.45;
    color: var(--ink);
    margin: 0 0 0;
    padding: 0 0 0 24px;
    border-left: 3px solid var(--accent);
}
.quote figcaption { display: flex; align-items: center; gap: 16px; padding-left: 24px; }
.quote-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-style: italic;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}
.quote cite { display: block; font-weight: 600; font-style: normal; color: var(--ink); }
.quote figcaption span { display: block; font-size: 13.5px; color: var(--muted); }

/* ─── ABOUT ───────────────────────────────── */
#about { padding: 100px 0; }
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: start;
}
.about-text p { font-size: 17px; line-height: 1.65; color: var(--ink); margin-bottom: 20px; max-width: 56ch; }
.about-text em { color: var(--accent); }
.about-side { position: sticky; top: 100px; }
.portrait-frame { padding: 6px; border: 1px solid var(--line); border-radius: 50%; width: 200px; height: 200px; margin: 0 auto 24px; }
.portrait {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #E25822 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-style: italic;
    font-size: 64px;
    color: #fff;
}
.facts { border-top: 1px solid var(--line); padding-top: 16px; }
.facts > div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 13.5px; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; font-size: 13.5px; }

/* ─── FINAL CTA ───────────────────────────── */
#cta { padding: 100px 0; text-align: center; }
#cta h2 { font-family: var(--serif); font-style: italic; max-width: 14ch; margin: 0 auto 24px; }
#cta > p { max-width: 540px; margin: 0 auto 32px; font-size: 18px; }
.cta-fineprint { font-size: 14px; color: var(--muted); margin-top: 32px; }
.cta-fineprint a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }

/* ─── FOOTER ──────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 32px; }
.footer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.footer-row p { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); text-align: right; max-width: 380px; margin: 0; }
.footer-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); flex-wrap: wrap; gap: 12px; }
.footer-meta a { color: var(--accent); }

/* ─── CUSTOM CURSOR (desktop only) ─────────── */
@media (hover: hover) and (pointer: fine) {
    body.has-cursor { cursor: none; }
    body.has-cursor a, body.has-cursor button { cursor: none; }
}
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s var(--ease);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
    mix-blend-mode: difference;
}
.cursor-ring.cursor-hover {
    width: 64px;
    height: 64px;
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    border-color: var(--accent);
}

/* ─── BACK TO TOP / HOME BUTTON ─────────── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 20px 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s var(--ease);
    z-index: 1000;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--accent);
}
.back-to-top svg {
    transition: transform 0.3s var(--ease);
}
.back-to-top:hover svg {
    transform: translateY(-3px);
}

/* ─── REVEAL ANIMATION ────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in-view { opacity: 1; transform: translate(0, 0); }

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 960px) {
    .nav-main { display: none; }
    .hero-illust { display: none; }
    .how-list li { grid-template-columns: 56px 1fr; gap: 20px; padding: 28px 0; }
    .how-num { font-size: 36px; }
    .demo-grid { grid-template-columns: 1fr; }
    .demo-grid > div { padding: 16px 0; border-top: 1px solid var(--line); }
    .demo-grid > div:first-child { border-top: 0; padding-left: 0; padding-right: 0; }
    .demo-body { padding: 24px; }
    .kpi-value { font-size: 32px; }
    .price-list { grid-template-columns: 1fr; }
    .price-row { border-right: 0; border-bottom: 1px solid var(--line); }
    .price-row:last-child { border-bottom: 0; }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .about-side { position: static; }
    .footer-row { flex-direction: column; gap: 16px; }
    .footer-row p { text-align: left; }
    .footer-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
}
