/*
    Exora website theme.

    The palette is lifted from the app so the two feel like one product:
      - brand gradient  cyan -> indigo -> violet   (Exora.Mail.App/Styles/BrandGradients.xaml)
      - accent          #5663E6                    (Exora.Mail.App/Styles/Colors.xaml)
    The app reserves the gradient for "brand moments" only (logo, rails, active underlines) and
    never uses it as a page or button fill. The site follows the same rule.

    No framework, no JavaScript. Dark mode follows the OS.
*/

/* ---------------------------------------------------------------- tokens */

:root {
    --brand-cyan: #2BB8F5;
    --brand-indigo: #5B6EE8;
    --brand-violet: #8B3FD6;
    --brand-gradient: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-indigo) 52%, var(--brand-violet) 100%);

    /* Three accent roles, because one value cannot stay legible in all three places:
         --accent       links and interactive text on the page background
         --accent-fill  solid button backgrounds, always carrying white text
         --accent-text  accent-coloured text sitting on the pale --accent-wash
       The fill deliberately does NOT follow the dark-mode shift: lightening it for dark mode drops
       white-on-accent to ~3:1, which fails AA on the most important control on the page. */
    --accent: #5663E6;
    --accent-fill: #5663E6;
    --accent-fill-hover: #4A55D6;
    --accent-fill-active: #3F49C2;
    --accent-text: #3F49C2;
    --accent-on: #FFFFFF;
    --accent-wash: rgba(86, 99, 230, 0.08);

    --bg: #FAFAFC;
    --bg-elevated: #FFFFFF;
    --surface: #FFFFFF;
    --surface-subtle: #F4F5F9;
    --text: #16171C;
    --text-muted: #565C6B;
    --border: #E3E4EC;
    --shadow-sm: 0 1px 2px rgba(16, 18, 32, .06), 0 2px 8px rgba(16, 18, 32, .04);
    --shadow-md: 0 2px 6px rgba(16, 18, 32, .07), 0 12px 32px rgba(16, 18, 32, .07);

    --radius: 8px;
    --radius-lg: 14px;
    --measure: 1120px;

    --font: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* The app shifts its accent toward violet in dark mode; the site matches for text and
           links, which need to lift off a dark background. Button fills stay put (see above). */
        --accent: #8188EE;
        --accent-text: #AAB0F3;
        --accent-wash: rgba(129, 136, 238, 0.12);

        --bg: #131419;
        --bg-elevated: #1B1C23;
        --surface: #1E1F27;
        --surface-subtle: #24252F;
        --text: #F1F2F6;
        --text-muted: #A2A7B6;
        --border: #2E303B;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .32), 0 2px 8px rgba(0, 0, 0, .24);
        --shadow-md: 0 2px 6px rgba(0, 0, 0, .38), 0 12px 32px rgba(0, 0, 0, .32);
    }
}

/* ------------------------------------------------------------------ base */

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .35rem; }

a { color: var(--accent); text-decoration: none; }
/* Hover shifts toward --accent-text, which is darker in light mode and lighter in dark, so the
   change reads in both without ever losing contrast against the page. */
a:hover { color: var(--accent-text); text-decoration: underline; }

code {
    font-family: var(--font-mono);
    font-size: .9em;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1em .35em;
}

pre {
    font-family: var(--font-mono);
    font-size: .875rem;
    line-height: 1.55;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    overflow-x: auto;
    margin: 0 0 1rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: .5rem;
    background: var(--surface);
    color: var(--text);
    padding: .6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 100;
}
.skip-link:focus { left: .5rem; }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 4.5rem 0; }
.section--tint { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.section__head { max-width: 46rem; margin-bottom: 2.5rem; }
.section__head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .65rem;
}

.lede { font-size: 1.15rem; color: var(--text-muted); }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    padding: .8rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--accent-fill); color: var(--accent-on); }
.btn--primary:hover { background: var(--accent-fill-hover); color: var(--accent-on); }
.btn--primary:active { background: var(--accent-fill-active); }

.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--surface-subtle); color: var(--text); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 60px;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 600; font-size: 1.075rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }

.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.site-nav a {
    color: var(--text-muted);
    font-size: .95rem;
    font-weight: 500;
    padding: .45rem .7rem;
    border-radius: 6px;
}
.site-nav a:hover { color: var(--text); background: var(--surface-subtle); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
/* `.site-nav a` outranks `.btn--primary` on specificity, so without this the Download button
   inherits the muted link colour and ends up low-contrast text on the accent fill. */
.site-nav a.btn { padding: .5rem 1rem; font-size: .95rem; color: var(--accent-on); }
.site-nav a.btn:hover { background: var(--accent-fill-hover); color: var(--accent-on); }

/* ------------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; padding: 5rem 0 4.5rem; }
.hero::before {
    /* Soft brand glow behind the headline - the gradient as atmosphere, not as a fill. */
    content: "";
    position: absolute;
    inset: -40% 30% 40% -20%;
    background: var(--brand-gradient);
    filter: blur(120px);
    opacity: .16;
    pointer-events: none;
}
.hero .wrap { position: relative; }

.hero__grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) {
    .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; }
}

.hero h1 { margin-bottom: 1rem; }
.hero .lede { max-width: 34rem; margin-bottom: 1.75rem; }
.hero__note { font-size: .875rem; color: var(--text-muted); margin: 1.1rem 0 0; }

/* Stylised app illustration - deliberately schematic (no fake content), standing in for a real
   screenshot. To swap one in, replace the .app-frame block in Index.cshtml with an <img>. */
.app-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.app-frame__bar { display: flex; align-items: center; gap: .4rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.app-frame__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.app-frame__body { display: grid; grid-template-columns: 46px 1fr; min-height: 260px; }
.app-frame__rail { background: var(--brand-gradient); opacity: .9; }
.app-frame__list { padding: .9rem 1rem; display: grid; gap: .75rem; align-content: start; }
.app-frame__row { display: grid; grid-template-columns: 26px 1fr; gap: .7rem; align-items: center; }
.app-frame__avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-subtle); border: 1px solid var(--border); }
.app-frame__lines { display: grid; gap: .3rem; }
.app-frame__line { height: 7px; border-radius: 4px; background: var(--surface-subtle); border: 1px solid var(--border); }
.app-frame__line--short { width: 42%; }
.app-frame__line--mid { width: 68%; }
.app-frame__row--unread .app-frame__line:first-child { background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-muted); margin: 0; font-size: .95rem; }

.card__mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-wash);
    color: var(--accent-text);
    display: grid;
    place-items: center;
    margin-bottom: .9rem;
    font-size: 1.05rem;
}

/* Highlight panel - the one place besides the logo where the gradient gets an edge. */
.panel {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-gradient); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.checklist li { position: relative; padding-left: 1.6rem; color: var(--text-muted); margin: 0; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.checklist strong { color: var(--text); font-weight: 600; }

.callout {
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    background: var(--surface-subtle);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin: 0 0 1.25rem;
}
.callout p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- content */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 600; }

.table-scroll { overflow-x: auto; }

.meta { color: var(--text-muted); font-size: .9rem; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.75rem; margin: 0; }
.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: var(--accent-wash);
    color: var(--accent-text);
    font-weight: 700;
    font-size: .95rem;
    display: grid;
    place-items: center;
}
.steps h3 { margin-bottom: .35rem; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-elevated); padding: 3rem 0 2rem; margin-top: auto; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: var(--text-muted); font-size: .95rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer__brand p { color: var(--text-muted); font-size: .9rem; max-width: 22rem; margin: .75rem 0 0; }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .85rem; }
.site-footer__legal p { margin: 0 0 .35rem; }
