/*
 * HassleFree.tech — landing
 *
 * The page is a quiet technical document with one live thing in it: a terminal running the
 * real CLI. Everything else stays disciplined so that panel carries the personality.
 *
 * Colour comes from the product rather than from fashion: `--live` is the same green the
 * CLI paints a running service, and it is used for nothing else.
 */

:root {
    --ink:    #0b1220;   /* text, and the terminal's ground */
    --paper:  #fbfbf9;   /* page */
    --slate:  #5a6675;   /* secondary text */
    --wire:   #e3e6ea;   /* rules, borders */
    --signal: #0f6fff;   /* links, focus, the numbers that matter */
    --live:   #2bd47d;   /* running. state dots only */

    --ink-soft: rgba(11, 18, 32, 0.66);
    --panel:  #0d1526;   /* terminal panel, a shade off --ink so it reads as a surface */

    --measure: 68ch;
    --gap: clamp(1rem, 2.5vw, 2rem);
    --section-y: clamp(4.5rem, 9vw, 8rem);

    --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    --body: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; }

p { margin: 0 0 1rem; max-width: var(--measure); }
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 2px;
}

.wrap { width: min(1180px, 92vw); margin-inline: auto; }

/* ── Section markers: path fragments, because the platform is an API ──────────── */
.eyebrow {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--signal);
    margin: 0 0 1.1rem;
    display: block;
}
.eyebrow::before { content: ''; }

.lede {
    font-size: clamp(1.05rem, 1.6vw, 1.22rem);
    color: var(--ink-soft);
    max-width: 62ch;
}

/* ── Header ───────────────────────────────────────────────────────────────────── */
.masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(251, 251, 249, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--wire);
}
.masthead .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 66px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.05rem;
}
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.brand span i { font-style: normal; color: var(--slate); font-weight: 500; }

.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--slate);
    text-decoration: none;
}
.nav a:hover { color: var(--ink); }

.langswitch { display: flex; border: 1px solid var(--wire); border-radius: 6px; overflow: hidden; }
.langswitch button {
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border: 0;
    background: transparent;
    color: var(--slate);
    cursor: pointer;
}
.langswitch button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

/* ── Buttons ──────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.72rem 1.15rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); background: #16203a; }
.btn-ghost { border-color: var(--wire); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 em {
    font-style: normal;
    display: block;
    color: var(--slate);
    /* The second line is the honest half of the claim, so it sits quieter */
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.hero-note {
    margin-top: 1.4rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--slate);
}

/* ── Terminal: the one loud thing on the page ─────────────────────────────────── */
.terminal {
    background: var(--panel);
    border-radius: 12px;
    border: 1px solid #1b2740;
    box-shadow: 0 24px 60px -30px rgba(11, 18, 32, 0.6), 0 2px 8px -4px rgba(11, 18, 32, 0.3);
    overflow: hidden;
    font-family: var(--mono);
    font-size: clamp(0.72rem, 1.05vw, 0.84rem);
    line-height: 1.65;
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid #1b2740;
    color: #5d6b85;
    font-size: 0.72rem;
}
.terminal-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #263352; }
.terminal-bar .title { margin-left: auto; letter-spacing: 0.04em; }

.terminal-body {
    margin: 0;
    padding: 1rem 1.1rem 1.4rem;
    color: #c9d4e6;
    white-space: pre;
    overflow-x: auto;
    min-height: 20.5rem;
}
.terminal-body .prompt { color: #6f7f9c; }
.terminal-body .cmd { color: #ffffff; }
.terminal-body .head { color: #7e8ca6; }
.terminal-body .ok { color: var(--live); }
.terminal-body .warn { color: #f4bf6a; }
.terminal-body .dim { color: #63718c; }
.terminal-body .bar { color: var(--live); }
.terminal-body .barbg { color: #29354f; }
.terminal-body .accent { color: #6fb0ff; }

.caret {
    display: inline-block;
    width: 0.55em;
    height: 1.05em;
    background: var(--live);
    vertical-align: text-bottom;
    animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ── Facts strip ──────────────────────────────────────────────────────────────── */
.facts {
    border-block: 1px solid var(--wire);
    padding: 1.6rem 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}
.fact .n {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    display: block;
}
.fact .k {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--slate);
    display: block;
    margin-top: 0.2rem;
}

/* ── Sections ─────────────────────────────────────────────────────────────────── */
section { padding-block: var(--section-y); }
section + section { border-top: 1px solid var(--wire); }
.section-head { max-width: var(--measure); margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-bottom: 0.9rem; }

/* ── Primitives: a definition list, because that is what they are ─────────────── */
.primitives {
    display: grid;
    /* Six items: three columns divide evenly. auto-fit left holes filled with the
       divider colour, which read as broken cells rather than as space. */
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--wire);
    border: 1px solid var(--wire);
    border-radius: 12px;
    overflow: hidden;
}
.primitive { background: var(--paper); padding: 1.5rem 1.4rem; }
.primitive h3 { margin-bottom: 0.5rem; }
.primitive p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0.7rem; }
.primitive code {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--slate);
    background: rgba(15, 111, 255, 0.06);
    border: 1px solid rgba(15, 111, 255, 0.14);
    border-radius: 5px;
    padding: 0.12rem 0.4rem;
}

/* ── Path diagram ─────────────────────────────────────────────────────────────── */
.path {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.path-figure {
    border: 1px solid var(--wire);
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
}
.path-figure svg { width: 100%; height: auto; display: block; }
.path-list { list-style: none; margin: 0; padding: 0; }
.path-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--wire);
    font-size: 0.95rem;
}
.path-list li:last-child { border-bottom: 0; }
.path-list .hop {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--signal);
    padding-top: 0.22rem;
}
.path-list strong { font-weight: 600; }
.path-list span { color: var(--ink-soft); }

/* ── Two-column feature rows ──────────────────────────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.6rem);
}
.card {
    border: 1px solid var(--wire);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.6rem;
    background: #fff;
}
.card h3 { margin-bottom: 0.55rem; }
.card p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0; }
.card ul { margin: 0.8rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; color: var(--ink-soft); }
.card li { margin-bottom: 0.35rem; }

.snippet {
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--panel);
    color: #c9d4e6;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    margin: 1rem 0 0;
    white-space: pre;
}
.snippet .prompt { color: #6f7f9c; }
.snippet .cmd { color: #fff; }
.snippet .dim { color: #63718c; }

/* State dots reuse the CLI's own vocabulary */
.state { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.78rem; }
.state::before { content: '●'; color: var(--live); }

/* ── Contact ──────────────────────────────────────────────────────────────────── */
.contact {
    background: var(--ink);
    color: var(--paper);
    border-radius: 14px;
    padding: clamp(2.2rem, 5vw, 3.4rem);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}
.contact h2 { color: var(--paper); margin-bottom: 0.9rem; }
.contact p { color: rgba(251, 251, 249, 0.72); }
.contact .eyebrow { color: #6fb0ff; }
.contact .btn-primary { background: var(--paper); color: var(--ink); }
.contact .btn-primary:hover { background: #fff; }
.contact .btn-ghost { border-color: rgba(251, 251, 249, 0.28); color: var(--paper); }
.contact .btn-ghost:hover { border-color: var(--paper); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.contact-aside {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: rgba(251, 251, 249, 0.6);
    border-left: 1px solid rgba(251, 251, 249, 0.18);
    padding-left: clamp(1rem, 2vw, 1.8rem);
}
.contact-aside dt { color: var(--paper); margin-top: 0.9rem; }
.contact-aside dt:first-child { margin-top: 0; }
.contact-aside dd { margin: 0.15rem 0 0; }

/* ── Footer ───────────────────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--wire);
    padding: 2.2rem 0 3rem;
    font-size: 0.85rem;
    color: var(--slate);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
footer a { color: var(--slate); }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
    .primitives { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero-grid, .path, .contact { grid-template-columns: 1fr; }
    .facts { grid-template-columns: repeat(2, 1fr); row-gap: 1.4rem; }
    .nav { display: none; }
    .contact-aside { border-left: 0; border-top: 1px solid rgba(251, 251, 249, 0.18); padding-left: 0; padding-top: 1.4rem; }
}
@media (max-width: 620px) {
    .primitives { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .terminal-body { min-height: 16rem; }
}
