/* ---------------------------------------------------------------
   ENDCOM.NET - front desk / concierge design system
   Light, airy, corporate-friendly. See tokens below for the palette.
----------------------------------------------------------------*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Ground */
    --paper: #f6f7f4;
    --surface: #ffffff;
    --surface-sunken: #eef1ed;
    --line: #e1e6e1;
    --line-strong: #cdd5cd;

    /* Ink */
    --ink: #1b2420;
    --ink-soft: #52605a;
    --ink-faint: #7c8a83;

    /* Accent - concierge teal (trust, calm competence) */
    --teal: #0e6e64;
    --teal-deep: #0a554d;
    --teal-tint: #e3f0ee;

    /* Secondary accent - brass, used sparingly (nameplate / desk-bell nod) */
    --brass: #a8763a;
    --brass-tint: #f3e9da;

    --shadow-sm: 0 1px 2px rgba(27, 36, 32, 0.06);
    --shadow-md: 0 8px 24px rgba(27, 36, 32, 0.08);
    --shadow-lg: 0 16px 40px rgba(27, 36, 32, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #121917;
        --surface: #1b2422;
        --surface-sunken: #161d1b;
        --line: #2b3733;
        --line-strong: #3a4842;

        --ink: #edefec;
        --ink-soft: #a9b3ac;
        --ink-faint: #7c8a83;

        --teal: #3fc0ac;
        --teal-deep: #2a9285;
        --teal-tint: #17302c;

        --brass: #d3a45e;
        --brass-tint: #2c2417;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
    }
}

:root[data-theme="dark"] {
    --paper: #121917;
    --surface: #1b2422;
    --surface-sunken: #161d1b;
    --line: #2b3733;
    --line-strong: #3a4842;
    --ink: #edefec;
    --ink-soft: #a9b3ac;
    --ink-faint: #7c8a83;
    --teal: #3fc0ac;
    --teal-deep: #2a9285;
    --teal-tint: #17302c;
    --brass: #d3a45e;
    --brass-tint: #2c2417;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
    --paper: #f6f7f4;
    --surface: #ffffff;
    --surface-sunken: #eef1ed;
    --line: #e1e6e1;
    --line-strong: #cdd5cd;
    --ink: #1b2420;
    --ink-soft: #52605a;
    --ink-faint: #7c8a83;
    --teal: #0e6e64;
    --teal-deep: #0a554d;
    --teal-tint: #e3f0ee;
    --brass: #a8763a;
    --brass-tint: #f3e9da;
    --shadow-sm: 0 1px 2px rgba(27, 36, 32, 0.06);
    --shadow-md: 0 8px 24px rgba(27, 36, 32, 0.08);
    --shadow-lg: 0 16px 40px rgba(27, 36, 32, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
}

.wordmark {
    font-family: "Fraunces", Georgia, serif;
    font-style: italic;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
}

.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* ---------------------------------------------------------------
   Skip link + focus states
----------------------------------------------------------------*/

.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    z-index: 100;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

/* ---------------------------------------------------------------
   Layout shell
----------------------------------------------------------------*/

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------------------------------------------------------
   Nav
----------------------------------------------------------------*/

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
    max-width: 1160px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Fraunces", Georgia, serif;
    font-style: italic;
    font-size: 18px;
    flex-shrink: 0;
}

.brand-logo {
    height: 80px;
    width: auto;
    display: block;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--ink);
    border-color: var(--brass);
}

.nav-cta {
    background: var(--teal);
    color: var(--surface) !important;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border-bottom: none !important;
}

.nav-cta:hover {
    background: var(--teal-deep);
}

.nav-toggle {
    display: none;
}

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

.hero {
    padding: 88px 0 96px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal-deep);
    background: var(--teal-tint);
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(36px, 4.4vw, 52px);
    line-height: 1.12;
    font-weight: 600;
    color: var(--ink);
    text-wrap: balance;
    margin-bottom: 22px;
}

.hero h1 em {
    font-family: "Fraunces", Georgia, serif;
    font-style: italic;
    color: var(--teal-deep);
}

.hero-description {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 46ch;
    margin-bottom: 36px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 15.5px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--teal);
    color: var(--surface);
}

.btn-primary:hover {
    background: var(--teal-deep);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    border-color: var(--ink);
}

.trust-row {
    display: flex;
    gap: 28px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.trust-item {
    font-size: 13.5px;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-item .icon {
    width: 16px;
    height: 16px;
    color: var(--teal-deep);
}

/* Hero visual: stylised front-desk message card */

.hero-visual {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    position: relative;
}

.desk-card-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 18px;
}

.desk-card-label .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    display: inline-block;
    margin-right: 6px;
}

.desk-line {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.desk-line:first-of-type {
    border-top: none;
}

.desk-line .icon {
    width: 20px;
    height: 20px;
    color: var(--teal-deep);
    flex-shrink: 0;
    margin-top: 2px;
}

.desk-line-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.desk-line-sub {
    font-size: 13.5px;
    color: var(--ink-soft);
}

.desk-line-time {
    margin-left: auto;
    font-size: 13px;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   Section scaffolding
----------------------------------------------------------------*/

section {
    padding: 88px 0;
}

.section-head {
    max-width: 620px;
    margin-bottom: 48px;
}

.section-head.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 12px;
    display: block;
}

.section-head h2 {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 600;
    text-wrap: balance;
    margin-bottom: 14px;
}

.section-head p {
    color: var(--ink-soft);
    font-size: 16.5px;
}

/* ---------------------------------------------------------------
   Features - directory grid
----------------------------------------------------------------*/

.features {
    background: var(--surface-sunken);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--teal-tint);
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon .icon {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--ink-soft);
    font-size: 14.5px;
}

/* ---------------------------------------------------------------
   Chat demo - "message pad"
----------------------------------------------------------------*/

.chat-container {
    max-width: 720px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-sunken);
}

.chat-header .brand-mark {
    width: 26px;
    height: 26px;
    font-size: 13px;
}

.chat-header-text {
    font-weight: 600;
    font-size: 14.5px;
}

.chat-header-status {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

.chat-messages {
    height: 380px;
    overflow-y: auto;
    padding: 22px;
    background: var(--paper);
}

.message {
    margin-bottom: 18px;
    animation: fadeUp 0.25s ease;
    display: flex;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .message {
        animation: none;
    }
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    padding: 13px 18px;
    border-radius: var(--radius-md);
    max-width: 80%;
    font-size: 14.5px;
}

.message.user .message-content {
    background: var(--teal);
    color: var(--surface);
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.message-content strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--teal-deep);
}

.message.user .message-content strong {
    color: var(--teal-tint);
}

.message-content ul {
    margin-top: 8px;
    margin-left: 18px;
}

.message-content li {
    margin-bottom: 4px;
    color: var(--ink-soft);
}

.typing-indicator {
    letter-spacing: 2px;
    color: var(--ink-faint);
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    font-size: 14.5px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--teal);
}

.send-button {
    padding: 12px 26px;
    background: var(--teal);
    color: var(--surface);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 14.5px;
    transition: background 0.2s ease;
}

.send-button:hover {
    background: var(--teal-deep);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-suggestions {
    padding: 14px 20px 18px;
    background: var(--surface);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suggestion-chip {
    padding: 7px 14px;
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.suggestion-chip:hover {
    background: var(--teal-tint);
    border-color: var(--teal);
    color: var(--teal-deep);
}

/* ---------------------------------------------------------------
   API section - light code blocks
----------------------------------------------------------------*/

.code-examples {
    max-width: 720px;
    margin: 0 auto 40px;
    display: grid;
    gap: 20px;
}

.code-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--surface-sunken);
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
    font-weight: 600;
}

.copy-btn {
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
    font-size: 12.5px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.copy-btn:hover {
    border-color: var(--teal);
    color: var(--teal-deep);
}

.code-block pre {
    padding: 18px 20px;
    overflow-x: auto;
}

.code-block code {
    color: var(--ink-soft);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.7;
    font-variant-numeric: tabular-nums;
}

.api-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.api-link {
    padding: 11px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    font-size: 14.5px;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.api-link:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------------
   Tech stack
----------------------------------------------------------------*/

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 760px;
    margin: 0 auto;
}

.tech-item {
    padding: 9px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
}

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

footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

footer p {
    color: var(--ink-faint);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--teal-deep);
}

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

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero {
        padding: 48px 0 64px;
    }

    section {
        padding: 64px 0;
    }
}

@media (max-width: 700px) {
    .nav-links {
        display: none;
    }

    .container {
        padding: 0 18px;
    }

    .chat-input-container {
        flex-direction: column;
    }

    .send-button {
        width: 100%;
    }
}
