/* ==========================================================================
   TW Teams
   Design language is taken from the TurnKey Corrections wordmark: a heavy
   near-black lockup cut by a single blue rule. That rule is the motif -- it
   reappears as section markers, card edges, and hero texture throughout.
   ========================================================================== */

:root {
    /* Sampled from the live brand assets */
    --blue: #0b4c8c;            /* TurnKey rule */
    --blue-bright: #2079cf;     /* on dark */
    --blue-deep: #07365f;
    --red: #ed1b24;             /* Skillet Kitchens */

    --ink: #101215;
    --ink-2: #191d22;
    --ink-3: #262c34;
    --body: #4d5765;
    --body-dim: #97a3b4;
    --line: #e3e6ec;
    --line-dark: rgba(255, 255, 255, .12);
    --surface: #ffffff;
    --surface-alt: #f5f6f9;

    --error: #b3261e;
    --success: #1a6b3c;

    --radius: 4px;
    --radius-lg: 8px;
    --maxw: 1160px;

    --shadow: 0 1px 2px rgba(16, 18, 21, .04), 0 8px 24px -12px rgba(16, 18, 21, .18);
    --shadow-lift: 0 2px 4px rgba(16, 18, 21, .06), 0 24px 48px -20px rgba(16, 18, 21, .28);

    --display: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
    margin: 0;
    font-family: var(--display);
    font-size: 17px;
    line-height: 1.65;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5vw, 3.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); letter-spacing: -.025em; }
h3 { font-size: 1.1rem; letter-spacing: -.012em; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--blue); }
img { max-width: 100%; }

.page { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 740px; }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   The rule motif
   -------------------------------------------------------------------------- */

.eyebrow {
    display: flex; align-items: center; gap: 12px;
    text-transform: uppercase; letter-spacing: .16em;
    font-size: .72rem; font-weight: 700; color: var(--blue);
    margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--blue); flex: none; }
.eyebrow.center-rule { justify-content: center; }

.on-dark .eyebrow, .hero .eyebrow, .cta-band .eyebrow { color: var(--blue-bright); }
.on-dark .eyebrow::before, .hero .eyebrow::before, .cta-band .eyebrow::before { background: var(--blue-bright); }

/* Section heading with the struck rule above it, echoing the wordmark */
.section-title { margin-bottom: 38px; max-width: 34ch; text-wrap: balance; }
.section-title.wide { max-width: none; }
.ruled { position: relative; padding-top: 26px; }
.ruled::before {
    content: ""; position: absolute; top: 0; left: 0;
    width: 56px; height: 4px; background: var(--blue);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-divider { width: 1px; height: 26px; background: var(--line); flex: none; }
.brand-sub {
    font-size: .74rem; font-weight: 700; letter-spacing: .18em;
    text-transform: uppercase; color: var(--ink); white-space: nowrap;
}

.primary-nav { display: flex; align-items: center; gap: 2px; }
.nav-item {
    position: relative; padding: 10px 14px; text-decoration: none;
    color: var(--body); font-size: .9rem; font-weight: 600; white-space: nowrap;
    letter-spacing: -.005em; transition: color .15s;
}
.nav-item::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
    height: 3px; background: var(--blue); transform: scaleX(0); transform-origin: left;
    transition: transform .2s ease;
}
.nav-item:hover { color: var(--ink); }
.nav-item:hover::after { transform: scaleX(1); }
.nav-item.active { color: var(--ink); }
.nav-item.active::after { transform: scaleX(1); }
.nav-cta { margin-left: 12px; }
.nav-cta::after { display: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle-bar { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle-bar + .nav-toggle-bar { margin-top: 6px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 24px; border-radius: var(--radius);
    font-size: .9rem; font-weight: 700; letter-spacing: .02em; text-decoration: none;
    border: 2px solid transparent; cursor: pointer;
    transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.btn::after { content: "\2192"; font-weight: 400; transition: transform .18s ease; }
.btn:hover::after { transform: translateX(4px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-primary:disabled::after { content: none; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--blue); border-color: var(--blue); }
.btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative; overflow: hidden;
    background: var(--ink); color: #c2ccd9;
    padding: 96px 0 0;
}
/* Diagonal blue hairlines: the wordmark rule, repeated as texture */
.hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        -58deg,
        rgba(32, 121, 207, .13) 0 1px,
        transparent 1px 74px
    );
    pointer-events: none;
}
.hero::after {
    content: ""; position: absolute; top: -30%; right: -10%;
    width: 780px; height: 780px; border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 76, 140, .55) 0%, transparent 68%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 17ch; margin-bottom: .35em; }
.hero .lead { max-width: 56ch; color: #b6c2d1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Full-bleed blue rule struck across the hero, directly under the headline */
.hero-rule {
    position: relative; height: 3px; background: rgba(255, 255, 255, .1);
    margin: 56px 0 0;
}
.hero-rule::before {
    content: ""; position: absolute; left: 0; top: 0; height: 3px;
    width: 240px; background: var(--blue-bright);
}

.lead { font-size: 1.14rem; line-height: 1.6; }

/* Family-of-brands strip inside the hero */
.brand-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 52px; padding: 30px 0 40px; }
.brand-strip-label {
    font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--body-dim); flex: none; margin: 0;
}
.brand-strip a { display: inline-flex; align-items: center; }
.brand-strip img { height: 34px; width: auto; opacity: .85; transition: opacity .2s; }
.brand-strip img.stacked { height: 50px; }
.brand-strip img.tile { height: 52px; border-radius: var(--radius); }
.brand-strip a:hover img { opacity: 1; }

/* --------------------------------------------------------------------------
   Page head (interior pages)
   -------------------------------------------------------------------------- */

.page-head {
    position: relative; overflow: hidden;
    background: var(--ink); color: #b6c2d1;
    padding: 76px 0 68px;
}
.page-head::before {
    content: ""; position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        -58deg,
        rgba(32, 121, 207, .11) 0 1px,
        transparent 1px 74px
    );
    pointer-events: none;
}
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { color: #fff; max-width: 20ch; }
.page-head .lead { max-width: 62ch; margin-bottom: 0; color: #b6c2d1; }
.page-head-logo { height: 52px; width: auto; margin-bottom: 26px; display: block; }
.page-head-logo.tile { height: 72px; border-radius: var(--radius-lg); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-muted { background: var(--surface-alt); }
.section-dark { background: var(--ink-2); color: #b6c2d1; }
.section-dark h2, .section-dark h3 { color: #fff; }

/* --------------------------------------------------------------------------
   Solution cards -- each carries its real brand lockup
   -------------------------------------------------------------------------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px; }

.card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 30px 28px 28px; overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--blue); transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.card h2 { font-size: 1.2rem; }
.card p:last-of-type { margin-bottom: 0; }
.card .link-arrow { margin-top: auto; padding-top: 20px; }

a.card, .card-linked { text-decoration: none; color: var(--body); }
a.card h2, .card-linked h2 { color: var(--ink); }
a.card:hover, .card-linked:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: transparent; }
a.card:hover::before, .card-linked:hover::before { transform: scaleX(1); }

/* Brand lockup slot at the top of a card */
.card-logo { display: flex; align-items: center; min-height: 76px; margin-bottom: 22px; }
.card-logo img { max-height: 52px; width: auto; max-width: 78%; }
.card-logo img.tall { max-height: 76px; }
.card-logo img.tile { max-height: 76px; border-radius: var(--radius); }

/* --------------------------------------------------------------------------
   Numbered feature list
   -------------------------------------------------------------------------- */

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 4px 40px; counter-reset: feat; }
.feature { position: relative; padding: 26px 0; border-top: 1px solid var(--line); counter-increment: feat; }
.feature::before {
    content: counter(feat, decimal-leading-zero);
    display: block; font-size: .74rem; font-weight: 700; letter-spacing: .14em;
    color: var(--blue); margin-bottom: 10px;
}
.feature h3 { margin-bottom: .4em; }
.feature p { margin: 0; font-size: .96rem; }
.section-dark .feature { border-top-color: var(--line-dark); }
.section-dark .feature::before { color: var(--blue-bright); }

/* --------------------------------------------------------------------------
   Proof band
   -------------------------------------------------------------------------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 32px; }
.stat { border-left: 4px solid var(--blue); padding-left: 20px; }
.stat-value { display: block; font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -.035em; color: var(--ink); line-height: 1.05; }
.section-dark .stat-value { color: #fff; }
.stat-label { display: block; font-size: .86rem; margin-top: 8px; }

/* --------------------------------------------------------------------------
   Brand tile row -- the family of brands, shown with their own marks
   -------------------------------------------------------------------------- */

.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.tile-card {
    display: flex; flex-direction: column; text-decoration: none;
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--line); background: var(--surface); color: var(--body);
    transition: transform .22s ease, box-shadow .22s ease;
}
a.tile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* Every brand sits in an identical square, whatever shape its lockup is */
.tile-art {
    display: grid; place-items: center; aspect-ratio: 1 / 1;
    background: var(--ink); overflow: hidden; padding: 26px;
}
.tile-art img { display: block; width: auto; height: auto; max-width: 80%; max-height: 42%; }
.tile-art img.stacked { max-width: 52%; max-height: 64%; }
.tile-art img.cover { max-width: none; max-height: none; width: 100%; height: 100%; object-fit: cover; }
.tile-art.bleed { padding: 0; }

.tile-card .tile-body { display: block; padding: 20px; }
.tile-card h3 { margin-bottom: .25em; }
.tile-card p { margin: 0; font-size: .88rem; }

/* --------------------------------------------------------------------------
   Split rows
   -------------------------------------------------------------------------- */

.split { display: grid; grid-template-columns: 260px 1fr; gap: 44px; border-top: 1px solid var(--line); padding: 48px 0; align-items: start; }
.split:first-child { border-top: 0; padding-top: 0; }
.split-media { display: flex; align-items: flex-start; }
.split-media img { max-height: 68px; width: auto; max-width: 100%; }
.split-media img.tall { max-height: 112px; }
.split-media img.tile { max-height: 150px; border-radius: var(--radius-lg); }
.split-body { max-width: 68ch; }

.checks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 9px; }
.checks li::before {
    content: ""; position: absolute; left: 0; top: .68em;
    width: 14px; height: 3px; background: var(--blue);
}

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--blue);
    letter-spacing: .01em;
}
.link-arrow::after { content: "\2192"; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

.prose h2 { margin-top: 2.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose { font-size: 1.03rem; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band { position: relative; overflow: hidden; background: var(--blue-deep); color: #c5d6e8; }
.cta-band::before {
    content: ""; position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        -58deg,
        rgba(255, 255, 255, .07) 0 1px,
        transparent 1px 74px
    );
    pointer-events: none;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: #fff; border-color: #fff; color: var(--blue-deep); }
.cta-band .btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--body-dim); padding: 64px 0 28px; margin-top: auto; border-top: 4px solid var(--blue); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 42px; width: auto; display: block; margin-bottom: 18px; }
.footer-brand p { font-size: .92rem; margin: 0; max-width: 38ch; }
.footer-links h2 { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: #fff; margin-bottom: 14px; font-weight: 700; }
.footer-links a { display: block; color: var(--body-dim); text-decoration: none; font-size: .92rem; padding: 5px 0; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-legal { border-top: 1px solid var(--line-dark); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-legal p { font-size: .82rem; margin: 0; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
label { display: block; font-weight: 700; color: var(--ink); font-size: .84rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.req { color: var(--error); }
.input {
    width: 100%; padding: 13px 15px; font: inherit; font-size: .97rem; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 76, 140, .14); }
textarea.input { resize: vertical; }
.validation-message { display: block; color: var(--error); font-size: .87rem; margin-top: 6px; text-transform: none; }
.input.invalid, .invalid .input { border-color: var(--error); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }

.alert { border-radius: var(--radius); padding: 20px 22px; margin-bottom: 26px; border: 1px solid; border-left-width: 4px; }
.alert h2 { font-size: 1.15rem; margin-bottom: .3em; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: #eef7f1; border-color: #b9dcc7; border-left-color: var(--success); color: var(--success); }
.alert-error { background: #fdeeed; border-color: #f2c4c0; border-left-color: var(--error); color: var(--error); }

/* --------------------------------------------------------------------------
   Loading + Blazor error UI
   -------------------------------------------------------------------------- */

.app-loading { display: grid; place-items: center; min-height: 100vh; gap: 20px; color: var(--body); background: var(--ink); }
.app-loading img { height: 44px; width: auto; }
.app-loading-spinner {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .14); border-top-color: var(--blue-bright);
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: #ffeaa7; color: #4a3c00; padding: 12px 20px;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, .2);
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; font-size: 1.3rem; line-height: 1; }
#blazor-error-ui .reload { color: #4a3c00; }

/* --------------------------------------------------------------------------
   Motion + focus
   -------------------------------------------------------------------------- */

.rise { animation: rise .6s cubic-bezier(.22, .8, .3, 1) both; }
.rise-2 { animation-delay: .07s; }
.rise-3 { animation-delay: .14s; }
.rise-4 { animation-delay: .21s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

a:focus-visible, button:focus-visible, .input:focus-visible {
    outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 2px;
}

/* FocusOnNavigate moves focus to the page h1 for screen readers. It is not
   interactive, so it should not paint a focus ring. */
[tabindex="-1"]:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .split { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 860px) {
    body { font-size: 16px; }
    .section { padding: 60px 0; }
    .hero { padding-top: 64px; }
    .page-head { padding: 56px 0 48px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .form-card { padding: 24px; }
    .feature-grid { gap: 0 32px; }

    .nav-toggle { display: block; order: 3; }
    .brand-divider, .brand-sub { display: none; }
    .primary-nav {
        display: none; order: 4; flex-basis: 100%; flex-direction: column;
        align-items: stretch; gap: 0; padding: 6px 0 18px; border-top: 1px solid var(--line);
    }
    .primary-nav.open { display: flex; }
    .nav-item { padding: 13px 2px; }
    .nav-item::after { left: 2px; right: 2px; bottom: 6px; }
    .nav-cta { margin: 12px 0 0; justify-content: center; }
    .brand-strip { gap: 16px 32px; }
}

@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .btn { width: 100%; justify-content: center; }
    .cta-actions .btn { width: auto; }
}
