/* ============================================
   RIDGEWAY.CLOUD — STYLES
   Grounded · Clear · Confident
   ============================================ */

:root {
    --cream:        #f4f1eb;
    --cream-deep:   #e8e3d8;
    --bone:         #faf8f3;
    --ink:          #1a1917;
    --ink-soft:     #5a5850;
    --forest:       #2a3d28;
    --forest-deep:  #1e2c1c;
    --sage:         #4a6347;
    --amber:        #b8892e;
    --amber-soft:   rgba(184, 137, 46, 0.14);
    --slate:        #3d4a5c;
    --rule:         #d4cfc4;
    --accent:       #1a3a1a;

    /* Theme-able extras (see "THEMES" at the end of this file) */
    --on-dark:      #f4f1eb;   /* text on the dark brand surfaces */
    --accent-light: #d9b872;   /* italic highlight on dark surfaces */
    --nav-bg:       rgba(244, 241, 235, 0.9);
    --surface:      #ffffff;   /* small white panels (demo window) */
    --brand-text:   var(--forest); /* brand colour used for text and outlines */

    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body:    'DM Sans', -apple-system, system-ui, sans-serif;

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --shadow-soft: 0 20px 48px rgba(26, 25, 23, 0.10);
    --shadow-lift: 0 24px 56px rgba(26, 25, 23, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Subtle paper-grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    mix-blend-mode: multiply;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--forest); color: var(--on-dark); }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 1200;
    background: var(--forest);
    color: var(--on-dark);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: top 0.25s ease;
}
.skip-link:focus { top: 1rem; }

/* Reveal-on-scroll utility */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal-group] > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* Ridge-line divider — a nod to Ridgeway's namesake contours */
.ridge-divider {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0 1.75rem;
}
.ridge-divider svg { display: block; }
.ridge-divider--dark { color: rgba(244, 241, 235, 0.35); }
.ridge-divider--light { color: var(--rule); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 4vw;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.navbar.is-scrolled {
    border-bottom-color: var(--rule);
    box-shadow: 0 8px 24px rgba(26, 25, 23, 0.06);
    padding: 0.85rem 4vw;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-mark {
    height: 44px;
    width: 44px;
    padding: 0;
    background: var(--forest);
    color: var(--on-dark);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0;
    border-radius: 6px;
    transition: transform 0.3s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }

/* The Ridgeway logo (same artwork as the app, img/ridgeway-logo.png), drawn as a
   mask so it takes the theme's brand colour. 422×120 artwork. */
.rw-logo {
    display: block;
    flex-shrink: 0;
    height: 36px;
    width: 127px;
    background-color: var(--brand-text);
    -webkit-mask: url("/img/ridgeway-logo.png") no-repeat left center / contain;
    mask: url("/img/ridgeway-logo.png") no-repeat left center / contain;
}
.rw-logo-sm { height: 30px; width: 106px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-line-1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}
.logo-line-2 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-top: 3px;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    position: relative;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color 0.2s ease;
    letter-spacing: 0.02em;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 1.5px;
    background: var(--amber);
    transition: right 0.3s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { right: 0; }

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--forest);
    color: var(--on-dark);
    border: none;
    padding: 0.65rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}
.nav-cta:hover {
    background: var(--forest-deep);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.nav-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 6px;
}
.nav-menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-menu-toggle.open span:nth-child(2) { opacity: 0; }
.nav-menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--bone);
    z-index: 99;
    padding: 6rem 2rem 2.5rem;
    flex-direction: column;
    gap: 1.75rem;
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease);
    box-shadow: var(--shadow-lift);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1rem;
}
.mobile-menu .nav-cta { align-self: flex-start; color: var(--on-dark); border-bottom: none; padding-bottom: 0.65rem; }

/* Log in (to the Ridgeway investing app at /login) — top right */
.nav-login {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--brand-text);
    border-radius: 6px;
    color: var(--brand-text);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}
.nav-login:hover {
    background: var(--forest);
    color: var(--on-dark);
    transform: translateY(-1px);
}
@media (max-width: 640px) {
    .nav-right { gap: 0.75rem; }
    #nav-contact-btn { display: none; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    /* Grows to fit the text, so the headline is never pushed up under the top bar on short screens */
    min-height: clamp(560px, 88vh, 860px);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 62%;
    transform: scale(1.08);
    animation: heroZoom 22s ease-out forwards;
}

@keyframes heroZoom {
    to { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        190deg,
        rgba(20, 24, 18, 0.15) 0%,
        rgba(20, 24, 18, 0.35) 45%,
        rgba(16, 20, 14, 0.82) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 6rem 6vw 4.5rem;
    max-width: 800px;
    animation: heroRise 1s var(--ease) 0.2s both;
}

@keyframes heroRise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(244, 241, 235, 0.8);
    margin-bottom: 1.4rem;
    font-weight: 500;
}
.hero-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--amber);
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.4vw, 5.6rem);
    font-weight: 400;
    color: var(--on-dark);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
}
.hero-content h1 em {
    font-style: italic;
    color: var(--accent-light);
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(244, 241, 235, 0.82);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 2.25rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--cream);
    color: var(--ink);
    padding: 0.95rem 1.9rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}
.hero-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--on-dark);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(244, 241, 235, 0.4);
    padding-bottom: 3px;
    transition: border-color 0.25s ease, gap 0.25s ease;
}
.hero-btn-secondary:hover { border-color: var(--on-dark); gap: 0.8rem; }

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}
.hero-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    color: rgba(244, 241, 235, 0.75);
    font-weight: 400;
    letter-spacing: 0.01em;
}
.hero-chip svg { color: var(--amber); flex-shrink: 0; }

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(244, 241, 235, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.scroll-cue svg { animation: scrollBob 2.2s ease-in-out infinite; }
@keyframes scrollBob {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(7px); opacity: 1; }
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    padding: 1.6rem 4vw;
}
.trust-bar-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-weight: 500;
}
.trust-item svg { color: var(--sage); flex-shrink: 0; }

/* ============================================
   APP DEVELOPMENT SECTION (main line of work — leads the page)
   ============================================ */
.apps-section {
    padding: 7rem 4vw 6.5rem;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
}
.apps-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 4rem;
    align-items: center;
}
.apps-section .apps-eyebrow { text-align: left; color: var(--amber); }
.apps-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin-bottom: 1.5rem;
}
.apps-title em { font-style: italic; color: var(--sage); }
.apps-lead {
    font-size: 1.05rem;
    color: var(--ink-soft);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 520px;
}
.apps-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}
.apps-btn {
    display: inline-flex;
    align-items: center;
    background: var(--forest);
    color: var(--on-dark);
    padding: 0.95rem 1.9rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}
.apps-btn:hover {
    background: var(--forest-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.apps-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--brand-text);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 3px;
    transition: border-color 0.25s ease;
}
.apps-link:hover { border-color: var(--brand-text); }
.apps-visual { color: var(--sage); }
.apps-visual svg { width: 100%; height: auto; display: block; }

.apps-examples {
    max-width: 1080px;
    margin: 4.5rem auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
.apps-card {
    background: var(--cream);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--amber);
    border-radius: 10px;
    padding: 1.6rem 1.4rem;
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.apps-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.apps-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
}
.apps-card p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.65; }

.apps-included {
    max-width: 1080px;
    margin: 2.5rem auto 0;
    padding: 2rem 2.25rem;
    background: var(--forest);
    color: var(--on-dark);
    border-radius: 10px;
}
.apps-included h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.1rem;
}
.apps-included ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem 2.5rem;
}
.apps-included li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(244, 241, 235, 0.85);
}
.apps-included li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
}

.section-title.section-title-tight { margin-bottom: 1.25rem; }
.section-sub {
    max-width: 560px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 3.5rem;
}

@media (max-width: 960px) {
    .apps-inner { grid-template-columns: 1fr; gap: 3rem; }
    .apps-visual { max-width: 420px; }
    .apps-examples { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .apps-section { padding: 4.5rem 4vw; }
    .apps-examples { grid-template-columns: 1fr; margin-top: 3rem; }
    .apps-included { padding: 1.6rem 1.4rem; }
    .apps-included ul { grid-template-columns: 1fr; }
}

/* ============================================
   REPLACE OLD SOFTWARE + CHANGE-REQUEST DEMO
   The demo's resting (non-animated) state is the finished one: chat + "Live" table.
   The animations hide/reveal panels on one 16s loop; reduced motion shows the resting state.
   ============================================ */
.replace-section {
    padding: 7rem 4vw 7rem;
    background: var(--cream-deep);
}
.replace-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.replace-compare {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.replace-col {
    border-radius: 10px;
    padding: 2rem 2.1rem;
}
.replace-col h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.1rem;
}
.replace-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.replace-col li {
    position: relative;
    padding-left: 1.7rem;
    font-size: 0.95rem;
    line-height: 1.55;
}
.replace-col li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}
.replace-col-old {
    background: var(--bone);
    border: 1px solid var(--rule);
    color: var(--ink-soft);
}
.replace-col-old h3 { color: var(--ink-soft); }
.replace-col-old li::before { content: '✕'; color: #a45a4a; font-size: 0.85rem; top: 0.1em; }
.replace-col-new {
    background: var(--forest);
    color: var(--on-dark);
    box-shadow: var(--shadow-soft);
}
.replace-col-new li { color: rgba(244, 241, 235, 0.9); }
.replace-col-new li::before { content: '✓'; color: var(--amber); }
.replace-col-new em { font-style: italic; color: var(--accent-light); }

/* ---- Change feature: its own highlighted band straight after the hero ---- */
.change-section {
    position: relative;
    padding: 6.5rem 4vw;
    background: var(--forest);
    color: var(--on-dark);
    overflow: hidden;
}
.change-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(900px 500px at 85% 20%, rgba(184, 137, 46, 0.18), transparent 60%);
}
.change-inner { position: relative; max-width: 1080px; margin: 0 auto; }
.change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    row-gap: 0.55rem;
}
.change-badge span {
    white-space: nowrap;
    background: var(--amber);
    color: var(--forest-deep);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
}
.change-section .change-title { color: var(--on-dark); font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.change-section .change-title em { color: var(--accent-light); }
.change-section .change-lead { color: rgba(244, 241, 235, 0.82); font-size: 1.08rem; }
.change-section .change-steps li { color: rgba(244, 241, 235, 0.78); }
.change-section .change-steps strong { color: var(--on-dark); }
.change-section .change-steps li::before { background: var(--amber); color: var(--forest-deep); }
.change-section .change-demo {
    background: var(--forest-deep);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(244, 241, 235, 0.08);
}

/* ---- Change feature: copy + animated demo ---- */
.change-feature {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
}
.replace-section .change-eyebrow { text-align: left; color: var(--amber); }
.change-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.8vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin-bottom: 1.25rem;
}
.change-title em { font-style: italic; color: var(--sage); }
.change-lead {
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.75;
    margin-bottom: 1.75rem;
}
.change-steps {
    list-style: none;
    counter-reset: cs;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.change-steps li {
    counter-increment: cs;
    position: relative;
    padding-left: 2.6rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.change-steps li::before {
    content: counter(cs);
    position: absolute;
    left: 0;
    top: -0.1rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--forest);
    color: var(--on-dark);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1rem;
}
.change-steps strong { color: var(--ink); font-weight: 600; }

/* ---- Demo window ---- */
.change-demo {
    background: var(--forest);
    border-radius: 16px;
    padding: 1.6rem;
    box-shadow: var(--shadow-lift);
}
.cd-window {
    background: var(--bone);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.82rem;
    color: var(--ink);
}
.cd-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--rule);
    background: var(--cream);
}
.cd-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.cd-bar em { margin-left: 0.6rem; font-style: normal; font-size: 0.75rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.cd-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 1rem 0.9rem 0.85rem;
    border-bottom: 1px solid var(--rule);
}
.cd-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--brand-text);
}
.cd-step i {
    font-style: normal;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--forest);
    color: var(--on-dark);
    box-shadow: 0 0 0 4px var(--bone);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 400;
}
.cd-track-line {
    position: absolute;
    top: calc(1rem + 13px);
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--rule);
}
.cd-track-fill { height: 100%; width: 100%; background: var(--amber); }

.cd-body {
    display: grid;
    grid-template-areas: "chat" "stage";
    gap: 0.9rem;
    padding: 1rem 0.9rem 1.1rem;
}
.cd-chat { grid-area: chat; display: flex; flex-direction: column; gap: 0.5rem; min-height: 7.2rem; }
.cd-msg {
    max-width: 82%;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    line-height: 1.45;
}
.cd-msg-user { align-self: flex-end; background: var(--forest); color: var(--on-dark); border-bottom-right-radius: 4px; }
.cd-msg-bot { align-self: flex-start; background: var(--cream-deep); color: var(--ink); border-bottom-left-radius: 4px; }
.cd-msg b { font-weight: 600; }

.cd-approve, .cd-build, .cd-live { grid-area: stage; align-self: start; }
.cd-approve, .cd-build {
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 0.8rem 0.9rem;
    background: var(--surface);
    opacity: 0;
    visibility: hidden;
}
.cd-approve-head, .cd-build-head {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    font-weight: 600;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.cd-approve-row { margin-bottom: 0.7rem; }
.cd-approve-actions { display: flex; gap: 0.5rem; }
.cd-btn-approve, .cd-btn-ghost {
    position: relative;
    display: inline-grid;
    padding: 0.4rem 0.9rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
}
.cd-btn-approve { background: var(--forest); color: var(--on-dark); }
.cd-btn-approve > span { grid-area: 1 / 1; }
.cd-btn-done { opacity: 0; }
.cd-btn-ghost { border: 1px solid var(--rule); color: var(--ink-soft); }

.cd-spinner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--amber-soft);
    border-top-color: var(--amber);
    animation: cdSpin 0.8s linear infinite;
}
@keyframes cdSpin { to { transform: rotate(360deg); } }
.cd-build-bar { height: 6px; border-radius: 3px; background: var(--cream-deep); overflow: hidden; margin-bottom: 0.5rem; }
.cd-build-fill { height: 100%; width: 100%; background: var(--sage); border-radius: 3px; }
.cd-build-note { font-size: 0.75rem; color: var(--sage); font-weight: 600; }

.cd-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.5rem;
}
.cd-dot { width: 8px; height: 8px; border-radius: 50%; background: #4c9a5a; box-shadow: 0 0 0 3px rgba(76, 154, 90, 0.2); }
.cd-table { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface); }
.cd-tr { display: grid; grid-template-columns: 1.3fr 1.2fr 0.7fr; }
.cd-tr span { padding: 0.42rem 0.7rem; border-top: 1px solid var(--cream-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-th span { border-top: none; background: var(--cream); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.cd-new { background: var(--amber-soft); color: var(--ink); font-weight: 600; }
.cd-th .cd-new { background: rgba(184, 137, 46, 0.22); color: var(--ink); }

/* ---- The 16-second story ---- */
.change-demo.is-visible .cd-msg-user    { animation: cdUser 16s infinite; }
.change-demo.is-visible .cd-msg-bot     { animation: cdBot 16s infinite; }
.change-demo.is-visible .cd-approve     { animation: cdApprove 16s infinite; }
.change-demo.is-visible .cd-btn-label   { animation: cdBtnLabel 16s infinite; }
.change-demo.is-visible .cd-btn-done    { animation: cdBtnDone 16s infinite; }
.change-demo.is-visible .cd-btn-approve { animation: cdBtnPress 16s infinite; }
.change-demo.is-visible .cd-build       { animation: cdBuild 16s infinite; }
.change-demo.is-visible .cd-build-fill  { animation: cdBuildFill 16s infinite; }
.change-demo.is-visible .cd-build-note  { animation: cdBuildNote 16s infinite; }
.change-demo.is-visible .cd-live        { animation: cdLive 16s infinite; }
.change-demo.is-visible .cd-new         { animation: cdNewCol 16s infinite; }
.change-demo.is-visible .cd-track-fill  { animation: cdTrack 16s infinite; }
.change-demo.is-visible .cd-s1          { animation: cdStep1 16s infinite; }
.change-demo.is-visible .cd-s2          { animation: cdStep2 16s infinite; }
.change-demo.is-visible .cd-s3          { animation: cdStep3 16s infinite; }
.change-demo.is-visible .cd-s4          { animation: cdStep4 16s infinite; }

@keyframes cdUser   { 0%, 3% { opacity: 0; transform: translateY(8px); } 6%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes cdBot    { 0%, 10% { opacity: 0; transform: translateY(8px); } 13%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes cdApprove {
    0%, 17% { opacity: 0; visibility: visible; transform: translateY(8px); }
    20%, 37% { opacity: 1; visibility: visible; transform: none; }
    40%, 100% { opacity: 0; visibility: hidden; }
}
@keyframes cdBtnLabel { 0%, 29% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes cdBtnDone  { 0%, 29% { opacity: 0; } 30%, 100% { opacity: 1; } }
@keyframes cdBtnPress {
    0%, 27% { transform: none; background: var(--forest); }
    28.5% { transform: scale(0.92); }
    30%, 100% { transform: none; background: #4c9a5a; }
}
@keyframes cdBuild {
    0%, 40% { opacity: 0; visibility: hidden; transform: translateY(8px); }
    41% { opacity: 0; visibility: visible; transform: translateY(8px); }
    44%, 65% { opacity: 1; visibility: visible; transform: none; }
    68%, 100% { opacity: 0; visibility: hidden; }
}
@keyframes cdBuildFill { 0%, 44% { width: 0; } 61%, 100% { width: 100%; } }
@keyframes cdBuildNote { 0%, 61% { opacity: 0; } 63%, 100% { opacity: 1; } }
@keyframes cdLive {
    0%, 68% { opacity: 0; transform: translateY(8px); }
    71%, 92% { opacity: 1; transform: none; }
    97%, 100% { opacity: 0; }
}
@keyframes cdNewCol {
    0%, 71% { background: rgba(184, 137, 46, 0.55); }
    80%, 100% { background: var(--amber-soft); }
}
@keyframes cdTrack { 0%, 5% { width: 0; } 13% { width: 0; } 30% { width: 33.3%; } 44% { width: 66.6%; } 71%, 94% { width: 100%; } 97%, 100% { width: 0; } }
@keyframes cdStep1 { 0%, 4% { opacity: 0.35; } 6%, 94% { opacity: 1; } 97%, 100% { opacity: 0.35; } }
@keyframes cdStep2 { 0%, 29% { opacity: 0.35; } 31%, 94% { opacity: 1; } 97%, 100% { opacity: 0.35; } }
@keyframes cdStep3 { 0%, 43% { opacity: 0.35; } 45%, 94% { opacity: 1; } 97%, 100% { opacity: 0.35; } }
@keyframes cdStep4 { 0%, 70% { opacity: 0.35; } 72%, 94% { opacity: 1; } 97%, 100% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
    .change-demo .cd-window *, .change-demo.is-visible .cd-window * { animation: none !important; }
}

/* ---- Ask feature: second standout band, light, mirrored layout ---- */
.ask-section {
    position: relative;
    padding: 6.5rem 4vw;
    background: var(--cream);
    overflow: hidden;
}
.ask-feature { grid-template-columns: 1.1fr 1fr; }
.ask-section .change-badge { color: var(--brand-text); }
.ask-section .change-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.ask-examples {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.75rem;
}
.ask-examples li {
    align-self: flex-start;
    padding: 0.5rem 0.9rem;
    border-radius: 12px 12px 12px 4px;
    background: var(--surface);
    border: 1px solid var(--rule);
    font-size: 0.92rem;
    color: var(--ink);
}
.ask-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 0.9rem 1.1rem;
    min-height: 22rem;
}
.ask-card {
    align-self: flex-start;
    width: 92%;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    padding: 0.75rem 0.9rem;
}
.ask-card-head {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.ask-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.9rem; margin: 0; }
.ask-facts dt { color: var(--ink-soft); font-size: 0.74rem; }
.ask-facts dd { margin: 0; color: var(--ink); }
.ask-pill { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--amber-soft); font-weight: 600; font-size: 0.74rem; }
.ask-typing {
    align-self: flex-start;
    display: none;
    gap: 4px;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: var(--cream-deep);
}
.ask-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); animation: askDot 1s infinite; }
.ask-typing i:nth-child(2) { animation-delay: 0.15s; }
.ask-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes askDot { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* ---- The 14-second story: question → answer card → follow-up → short answer ---- */
.ask-demo.is-visible .ask-q1 { animation: askQ1 14s infinite; }
.ask-demo.is-visible .ask-t1 { animation: askT1 14s infinite; }
.ask-demo.is-visible .ask-a1 { animation: askA1 14s infinite; }
.ask-demo.is-visible .ask-q2 { animation: askQ2 14s infinite; }
.ask-demo.is-visible .ask-t2 { animation: askT2 14s infinite; }
.ask-demo.is-visible .ask-a2 { animation: askA2 14s infinite; }
@keyframes askQ1 { 0%, 3% { opacity: 0; transform: translateY(8px); } 7%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes askT1 { 0%, 9% { display: none; } 10%, 19% { display: flex; } 20%, 100% { display: none; } }
@keyframes askA1 { 0%, 19% { opacity: 0; transform: translateY(8px); } 23%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes askQ2 { 0%, 45% { opacity: 0; transform: translateY(8px); } 49%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes askT2 { 0%, 51% { display: none; } 52%, 61% { display: flex; } 62%, 100% { display: none; } }
@keyframes askA2 { 0%, 61% { opacity: 0; transform: translateY(8px); } 65%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .ask-demo .cd-window *, .ask-demo.is-visible .cd-window * { animation: none !important; }
}

@media (max-width: 960px) {
    .change-feature { grid-template-columns: 1fr; gap: 3rem; }
    .ask-feature .change-copy { order: -1; }
}
@media (max-width: 640px) {
    .ask-section { padding: 4.5rem 4vw; }
    .ask-body { min-height: 0; }
}
@media (max-width: 640px) {
    .replace-section { padding: 4.5rem 4vw; }
    .replace-compare { grid-template-columns: 1fr; }
    .change-section { padding: 4.5rem 4vw; }
    .replace-col { padding: 1.6rem 1.4rem; }
    .change-demo { padding: 0.9rem; }
    .cd-window { font-size: 0.78rem; }
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
    padding: 7rem 4vw 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sage);
    text-align: center;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    text-align: center;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: 4rem;
    max-width: 680px;
}
.section-title em {
    font-style: italic;
    color: var(--sage);
}

.product-grid {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   SERVICE CARD
   ============================================ */
.product-card {
    background: var(--bone);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s ease;
}
.product-card:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-10px) scale(1.015);
    border-color: var(--brand-text);
}

.product-image-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(150deg, var(--forest) 0%, var(--forest-deep) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><path d='M-20 60 Q60 20 120 60 T260 60' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.5'/><path d='M-20 120 Q60 80 120 120 T260 120' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.35'/><path d='M-20 180 Q60 140 120 180 T260 180' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.2'/></svg>");
    opacity: 0.5;
}

.product-index {
    position: absolute;
    top: 14px;
    left: 16px;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: rgba(244, 241, 235, 0.5);
    letter-spacing: 0.05em;
}

/* Service icon illustration */
.service-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(244, 241, 235, 0.8);
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease);
}
.product-card:hover .service-illustration { transform: scale(1.08); }
.service-illustration svg {
    width: 116px;
    height: 116px;
}

.product-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.product-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.product-price {
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-desc {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.75;
    flex-grow: 1;
}

.add-to-cart {
    background: var(--forest);
    color: var(--on-dark);
    border: none;
    padding: 0.85rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 0.65rem;
}
.add-to-cart:hover {
    background: var(--forest-deep);
    transform: translateY(-1px);
}

/* Detail toggle */
.detail-toggle {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule);
    padding: 0.85rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.detail-toggle:hover { border-color: var(--ink); background: var(--cream); }
.detail-toggle svg { transition: transform 0.3s ease; }
.detail-toggle.open svg { transform: rotate(180deg); }

.product-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s var(--ease), margin-top 0.4s ease;
}
.product-detail.open {
    max-height: 1000px;
    margin-top: 1rem;
}

.detail-inner {
    padding: 1.25rem;
    background: var(--cream);
    border: 1px solid var(--rule);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}
.product-detail.open .detail-inner {
    opacity: 1;
    transform: translateY(0);
}
.detail-inner h4 {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.65rem;
}

/* ============================================
   PROCESS SECTION
   ============================================ */
.process-section {
    padding: 6rem 4vw 7rem;
    background: var(--cream-deep);
}
.process-inner {
    max-width: 1080px;
    margin: 0 auto;
}
.process-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    counter-reset: step;
}
.process-steps::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--sage) 0 8px, transparent 8px 16px);
    opacity: 0.5;
}
.process-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.process-step-num {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--forest);
    color: var(--on-dark);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    box-shadow: 0 0 0 6px var(--cream-deep);
    transition: background 0.3s ease, transform 0.3s ease;
}
.process-step:hover .process-step-num {
    background: var(--amber);
    transform: scale(1.06);
}
.process-step h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
}
.process-step p {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

/* ============================================
   WHY SECTION
   ============================================ */
.why-section {
    position: relative;
    background: var(--forest);
    padding: 6.5rem 4vw;
    overflow: hidden;
}
.why-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><path d='M-40 80 Q60 20 160 80 T360 80 T560 80' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.06'/><path d='M-40 160 Q60 100 160 160 T360 160 T560 160' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.05'/><path d='M-40 240 Q60 180 160 240 T360 240 T560 240' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.04'/><path d='M-40 320 Q60 260 160 320 T360 320 T560 320' stroke='%23f4f1eb' stroke-width='1' fill='none' opacity='0.03'/></svg>");
    pointer-events: none;
}

.why-inner {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
}

.why-section .page-eyebrow {
    color: rgba(244, 241, 235, 0.5);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 0;
}

.why-card {
    padding: 2rem;
    border: 1px solid rgba(244, 241, 235, 0.12);
    border-radius: 10px;
    color: var(--on-dark);
    background: rgba(244, 241, 235, 0.04);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}
.why-card:hover {
    background: rgba(244, 241, 235, 0.07);
    border-color: rgba(184, 137, 46, 0.4);
    transform: translateY(-6px);
}

.why-icon {
    width: 48px;
    height: 48px;
    background: rgba(244, 241, 235, 0.08);
    border-radius: 8px;
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
    color: var(--amber);
    transition: background 0.3s ease;
}
.why-card:hover .why-icon { background: var(--amber-soft); }

.why-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--on-dark);
}

.why-card p {
    font-size: 0.9rem;
    color: rgba(244, 241, 235, 0.65);
    line-height: 1.75;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    padding: 7rem 4vw 6rem;
    display: flex;
    justify-content: center;
}

.contact-inner {
    max-width: 640px;
    text-align: center;
}

.contact-sub {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    margin-top: -2rem;
}

.contact-btn-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--forest);
    color: var(--on-dark);
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.contact-btn:hover {
    background: var(--forest-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.contact-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--ink-soft);
}
.contact-location svg { color: var(--sage); }

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bone);
    border-top: 1px solid var(--rule);
}
.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3.5rem 4vw 2.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.footer-brand .logo-mark { height: 36px; width: 36px; font-size: 1.3rem; }
.footer-brand-text { line-height: 1.3; }
.footer-brand-text strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--ink);
}
.footer-brand-text span {
    font-size: 0.78rem;
    color: var(--ink-soft);
}
.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.footer-col h4 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.35rem;
}
.footer-col a,
.footer-col span {
    font-size: 0.85rem;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
    border-top: 1px solid var(--rule);
    padding: 1.5rem 4vw;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

/* ============================================
   DRAWER (re-used for service detail)
   ============================================ */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 25, 23, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(2px);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background: var(--cream);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(26, 25, 23, 0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
    padding: 1.75rem;
    border-bottom: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
}

.cart-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink);
    transition: transform 0.2s ease;
}
.cart-close:hover { transform: rotate(90deg); }

.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem 1.75rem;
}

.drawer-service-icon {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(150deg, var(--forest) 0%, var(--forest-deep) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(244,241,235,0.3);
    margin-bottom: 2rem;
}

.drawer-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.5rem;
}

.drawer-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.drawer-desc {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.drawer-includes h4 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 1rem;
}

.drawer-includes ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.drawer-includes li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

.drawer-includes li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sage);
    flex-shrink: 0;
    margin-top: 0.45rem;
}

.cart-footer {
    padding: 1.75rem;
    border-top: 1px solid var(--rule);
    background: var(--bone);
}

.checkout-btn {
    display: block;
    width: 100%;
    background: var(--forest);
    color: var(--on-dark);
    border: none;
    padding: 1.05rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
}
.checkout-btn:hover {
    background: var(--forest-deep);
    transform: translateY(-1px);
}

/* ============================================
   CONTACT DRAWER — DIRECT INFO + ENQUIRY FORM
   ============================================ */
.contact-direct {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2.25rem;
}

.contact-direct-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.15rem 1.25rem;
    background: var(--bone);
    border: 1.5px solid var(--rule);
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--ink);
    transition: all 0.25s ease;
}
.contact-direct-link:hover {
    border-color: var(--brand-text);
    background: var(--cream-deep);
}
.contact-direct-link svg {
    flex-shrink: 0;
    color: var(--sage);
}

.contact-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}
.contact-divider::before,
.contact-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}
.contact-divider span { padding: 0 0.85rem; }

.enquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.enquiry-field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.enquiry-field span {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage);
}
.enquiry-field span em {
    font-style: normal;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink-soft);
}

.enquiry-field input,
.enquiry-field textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--bone);
    border: 1.5px solid var(--rule);
    border-radius: 8px;
    padding: 1rem 1.15rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.enquiry-field textarea {
    min-height: 140px;
}
.enquiry-field input::placeholder,
.enquiry-field textarea::placeholder {
    color: var(--ink-soft);
    opacity: 0.55;
}
.enquiry-field input:hover,
.enquiry-field textarea:hover {
    border-color: #c3bcae;
}
.enquiry-field input:focus,
.enquiry-field textarea:focus {
    outline: none;
    background: var(--cream);
    border-color: var(--brand-text);
    box-shadow: 0 0 0 4px rgba(42, 61, 40, 0.1);
}

.enquiry-status {
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 1.2em;
}
.enquiry-status.success { color: var(--sage); }
.enquiry-status.error { color: #a33d2b; }

#enquiry-submit {
    margin-top: 0.25rem;
}
#enquiry-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
    .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
    .process-steps::before { display: none; }
}

@media (max-width: 640px) {
    .navbar { padding: 1rem 4vw; }
    .nav-links { display: none; }
    .nav-menu-toggle { display: flex; }
    .mobile-menu { display: flex; }
    .logo-line-1 { font-size: 1.15rem; }
    .logo-line-2 { display: none; }
    .rw-logo { height: 30px; width: 106px; }
    .hero { min-height: max(480px, 78vh); }
    .hero-content h1 { font-size: 2.4rem; }
    .hero-chips { gap: 1rem 1.5rem; }
    .services-section { padding: 4.5rem 4vw; }
    .product-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; }
    .footer-links { gap: 2rem; }
}

/* Longer menu items (App development / Microsoft 365): keep them on one line and fold the
   menu into the ☰ button before the top bar runs out of room */
.nav-link, .logo-line-2 { white-space: nowrap; }
@media (max-width: 1000px) {
    .nav-links { display: none; }
    .nav-menu-toggle { display: flex; }
    .mobile-menu { display: flex; }
}

/* ============================================
   THEMES — the home page follows the theme picked in the Ridgeway app
   (saved in this browser as "portfolio-tracker-theme"; applied by the small
   script in index.html's <head>). "country" is the page's own look, so it
   needs no overrides; the others re-map the same tokens to the app's palette.
   ============================================ */
[data-theme="ridgeway"] {
    --cream:        #F4F6F9;
    --cream-deep:   #E7ECF3;
    --bone:         #FFFFFF;
    --ink:          #14213D;
    --ink-soft:     #5B6B82;
    --forest:       #0B2545;
    --forest-deep:  #071A33;
    --sage:         #1F6F6B;
    --amber:        #1F6F6B;
    --amber-soft:   rgba(31, 111, 107, 0.12);
    --rule:         #E2E7EE;
    --on-dark:      #FFFFFF;
    --accent-light: #8FD1CB;
    --nav-bg:       rgba(255, 255, 255, 0.92);
    --font-display: 'Source Serif 4', Georgia, serif;
}
[data-theme="copper"] {
    --cream:        #F6F1E7;
    --cream-deep:   #EFE7D9;
    --bone:         #FFFCF6;
    --ink:          #2B2A28;
    --ink-soft:     #6F665A;
    --forest:       #4A3324;
    --forest-deep:  #36251A;
    --sage:         #A8652A;
    --amber:        #B87333;
    --amber-soft:   rgba(184, 115, 51, 0.14);
    --rule:         #E3D8C6;
    --on-dark:      #FFFCF6;
    --accent-light: #E3A66B;
    --nav-bg:       rgba(246, 241, 231, 0.92);
    --font-display: 'Source Serif 4', Georgia, serif;
}
[data-theme="light"] {
    --cream:        #F2F3F6;
    --cream-deep:   #E7E9EE;
    --bone:         #FFFFFF;
    --ink:          #171A1F;
    --ink-soft:     #667085;
    --forest:       #0E4F63;
    --forest-deep:  #0A3B4A;
    --sage:         #0891B2;
    --amber:        #B45309;
    --amber-soft:   rgba(180, 83, 9, 0.12);
    --rule:         #E2E4E9;
    --on-dark:      #FFFFFF;
    --accent-light: #F3B27A;
    --nav-bg:       rgba(255, 255, 255, 0.92);
    --font-display: 'DM Sans', -apple-system, system-ui, sans-serif;
}
[data-theme="dark"] {
    --cream:        #14161A;
    --cream-deep:   #1C1F26;
    --bone:         #1C1F26;
    --ink:          #EEF0F3;
    --ink-soft:     #9AA2B0;
    --forest:       #1D5F78;
    --forest-deep:  #164B5F;
    --sage:         #4CC9F0;
    --amber:        #EAB308;
    --amber-soft:   rgba(234, 179, 8, 0.14);
    --rule:         #2C303A;
    --on-dark:      #EEF0F3;
    --accent-light: #F5D06B;
    --nav-bg:       rgba(20, 22, 26, 0.92);
    --surface:      #262A33;
    --brand-text:   #4CC9F0;
    --font-display: 'DM Sans', -apple-system, system-ui, sans-serif;
    --shadow-soft:  0 20px 48px rgba(0, 0, 0, 0.35);
    --shadow-lift:  0 24px 56px rgba(0, 0, 0, 0.5);
}
/* Sans-serif display face reads better a touch heavier */
[data-theme="light"] .hero-content h1, [data-theme="dark"] .hero-content h1,
[data-theme="light"] .section-title, [data-theme="dark"] .section-title,
[data-theme="light"] .apps-title, [data-theme="dark"] .apps-title,
[data-theme="light"] .change-title, [data-theme="dark"] .change-title { font-weight: 600; letter-spacing: -0.025em; }
/* Dark: no paper grain, and lift the light-on-light details */
[data-theme="dark"] body::before { opacity: 0; }
[data-theme="dark"] .hero-btn { background: var(--on-dark); color: #14161A; }
[data-theme="dark"] .cd-bar { background: var(--cream-deep); }
[data-theme="dark"] .cd-msg-bot { background: #2C303A; }
[data-theme="dark"] .enquiry-field input,
[data-theme="dark"] .enquiry-field textarea { background: var(--cream); color: var(--ink); border-color: var(--rule); }

/* "See demo" pill beside "Your team shapes the app" — opens home/demo.html */
.change-demo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--accent-light);
    color: var(--on-dark);
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease;
}
.change-demo-link svg { color: var(--accent-light); transition: color 0.25s ease; }
.change-demo-link:hover { background: var(--accent-light); color: var(--forest-deep); }
.change-demo-link:hover svg { color: var(--forest-deep); }
