@import url('https://fonts.googleapis.com/css2?family=Geist:ital,wght@0,100..900;1,100..900&display=swap');

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

:root {
    /* ===================================================================
       TCC BRAND COLOUR SYSTEM
       Single source of truth — sourced from the TCC brand colour guide.
       Every component below consumes these tokens; nothing is hardcoded.
       =================================================================== */

    /* Primary Blue — main brand colour: CTAs, links, icons, active/focus states */
    --primary: #053A5B;
    --primary-50: #ECF0F2;
    --primary-100: #B2C2CC;
    --primary-200: #8CA4B4;
    --primary-300: #587B91;
    --primary-400: #37617C;
    --primary-500: #053A5B;
    --primary-600: #053553;
    --primary-700: #042941;
    --primary-800: #032032;
    --primary-900: #021826;

    /* Primary Red — accent only: badges, error states, secondary CTAs */
    --accent: #B7232C;
    --accent-50: #F5E0E2;
    --accent-100: #E9BBBE;
    --accent-200: #DE9A9E;
    --accent-300: #CF6C72;
    --accent-400: #C54F56;
    --accent-500: #B7232C;
    --accent-600: #A72028;
    --accent-700: #82191F;
    --accent-800: #651318;
    --accent-900: #4D0F12;

    /* Grey — muted backgrounds, secondary text, borders, disabled states */
    --grey: #BDBDBD;
    --grey-50: #F2F2F2;
    --grey-100: #E8E8E8;
    --grey-200: #DBDBDB;
    --grey-300: #CECECE;
    --grey-400: #BDBDBD;
    --grey-600: #8E8E8E;
    --grey-700: #686868;
    --grey-800: #424242;
    --grey-900: #262626;

    /* Section background rhythm (White / Light Blue / Light Grey) */
    --bg-light-blue: #efeff0;
    --bg-light-blue-soft: #ECF0F2;

    /* Dark theme (legacy token names kept for compatibility with existing
       component classes below; --dark now maps to brand navy, not black) */
    --text-light: #ffffff;

    /* Light theme */
    --text-dark: #1a1a1a;

    /* Others */
    --bright: #ffffff;
    --dark: #021826;
    --light-gray: #F2F2F2;
    --polish-white: #e9e8e7;
    /* Typography */
    --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

    /* Weight scale */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Fluid type scale (clamp: min, preferred, max) */
    --fs-display: clamp(2rem, 1.5rem + 2.2vw, 3rem);
    /* hero / .main-heading */
    --fs-h2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
    /* section subheads */
    --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
    --fs-body: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
    /* replaces .text */
    --fs-small: 0.8125rem;

    /* Line-height ratios (unitless — scale with font-size automatically) */
    --lh-tight: 1.3;
    /* display headings */
    --lh-snug: 1.3;
    /* subheadings */
    --lh-relaxed: 1.6;
    /* body copy */

    /* Letter-spacing */
    --ls-tight: -0.02em;
    /* large headings */
    --ls-normal: 0;
    --ls-wide: 0.04em;
    /* eyebrow / uppercase labels */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--fw-regular);
    overflow-x: hidden;
    overscroll-behavior-x: none;
    width: 100%;
}

.main-heading {
    font-size: 1.9rem;
    line-height: 2.1rem;
    letter-spacing: var(--ls-tight);
    font-weight: var(--fw-bold);
}

@media (min-width: 768px) {
    .main-heading {
        line-height: 2.8rem;
    }
}

.text-primary {
    color: var(--primary)
}

.text-primary-hover:hover {
    color: var(--accent)
}

.text {
    font-size: 1rem;
    line-height: 1.3rem;
    font-weight: var(--fw-regular);
    color: var(--text-dark);
}

.bg-primary {
    background: var(--primary);
}

.bg-theme-gray {
    background: var(--light-gray);
}

.btn {
    padding: 10px 28px;
    border-radius: 5rem;
    border: 1px solid var(--primary);
    font-weight: 500;
    transition: all .3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bright);
}

.btn:focus-visible {
    outline: 2px solid var(--primary-700);
    outline-offset: 2px;
}

/* Primary: Blue background, white text. Hover: darker blue. */
.btn-primary {
    background: var(--primary);
    color: var(--bright);
    border-color: var(--primary);
}

/* .btn-primary:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
} */

/* Secondary: White background, blue border + text. Hover: light blue bg. */
.btn-secondary {
    background: var(--bright);
    color: var(--primary);
    border-color: var(--bright);
}

/* .btn-secondary:hover {
    background: var(--bg-light-blue-soft);
} */

/* Tertiary: glass / ghost button used over photography, tinted with brand blue */
.btn-tertiary {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, .10);
    border-color: #ffffff33;
    color: var(--bright)
}

.btn-tertiary:hover {
    background: rgba(255, 255, 255, .15);
    border-color: #ffffff55;
}

/* Accent: Red background, white text — badges / secondary CTAs / error actions only */
.btn-accent {
    background: var(--accent);
    color: var(--bright);
    border-color: var(--accent);
}

.btn-accent:hover {
    background: var(--accent-600);
    border-color: var(--accent-600);
}

.bg-primary {
    background: var(--primary);
}

.bg-accent {
    background: var(--accent);
}

.text-accent,
.text-accent-hover:hover {
    color: var(--accent);
}

.border-primary {
    border-color: var(--primary);
}

/* Section background rhythm: White / Light Blue / Light Grey */
.bg-theme-blue {
    background: var(--bg-light-blue);
}

/* Minimal form tokens — blue focus ring, grey borders, red only for errors */
input,
select,
textarea {
    border: 1px solid var(--grey-300);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bright);
    transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-50);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: var(--accent);
}

input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--accent-50);
}

.flex-1 {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Modal */

.modal-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 280ms ease;
    z-index: 100;
}

.modal-wrapper.is-visible {
    display: flex;
}

.modal-wrapper.is-open {
    opacity: 1;
}

.modal-container {
    width: 100%;
    max-width: 1100px;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 280ms ease;
}

.modal-wrapper.is-open .modal-container {
    transform: scale(1);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {

    .modal-wrapper,
    .modal-container {
        transition: none !important;
    }
}

/* Header */
#stickyHeader {
    z-index: 80;
    width: 100%;
    max-width: 100vw;
    padding: 0.85rem 0;
    /* background: rgba(255, 255, 255, 0.85); */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);

    /* Hidden by default: shifted up + invisible */
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

#stickyHeader.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Forced hidden while the Human/Machine toggle is showing the machine
   view — takes priority over .is-visible regardless of scroll position */
#stickyHeader.hm-header-hidden {
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    pointer-events: none !important;
}

#stickyHeader .sticky-links {
    background: rgba(0, 0, 0, 0.04);
}

#stickyHeader .sticky-cta {
    transition: transform 280ms ease, background-color 280ms ease;
}

#stickyHeader .sticky-cta:hover {
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    #stickyHeader {
        transition: opacity 1ms linear !important;
        transform: none !important;
    }
}

/* Hamburger */
.hm-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
}

.hm-burger svg {
    width: 1.5rem;
    height: 1.5rem;
}

.hm-burger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Bars morph into an X, all in SVG, no icon-swapping needed */
.hm-burger-bar {
    transform-origin: 12px 12px;
    transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1),
        opacity 200ms ease;
}

.hm-burger.is-open .hm-burger-bar-top {
    transform: translateY(6px) rotate(45deg);
}

.hm-burger.is-open .hm-burger-bar-mid {
    opacity: 0;
}

.hm-burger.is-open .hm-burger-bar-bottom {
    transform: translateY(-6px) rotate(-45deg);
}

/* Collapsible panel: height animates via JS-measured max-height so it
   works for any amount of content, fading in alongside the collapse */
.hm-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: var(--dark);
    border-radius: 0 0 1.5rem 1.5rem;
    transition: max-height 380ms cubic-bezier(0.65, 0, 0.35, 1),
        opacity 260ms ease;
}

.hm-mobile-menu.is-open {
    opacity: 1;
}

.hm-mobile-menu-inner {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1.75rem 2rem;
}

.hm-mobile-menu-inner a {
    color: var(--bright);
    font-size: 1rem;
    font-weight: var(--fw-medium);
    padding: 1rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 200ms ease;
}

.hm-mobile-menu-inner a:hover {
    color: var(--primary-100);
}

@media (prefers-reduced-motion: reduce) {

    .hm-burger-bar,
    .hm-mobile-menu {
        transition: none !important;
    }
}

.hero-overlay {
    background: linear-gradient(90deg,
            rgba(2, 24, 38, .92) 0%,
            rgba(2, 24, 38, .88) 35%,
            rgba(2, 24, 38, .55) 60%,
            rgba(2, 24, 38, .15) 78%,
            rgba(2, 24, 38, 0) 100%);
}

.glass {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, .10);
}

.text-hero {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 2.5rem;
}

@media (min-width: 1280px) {
    .text-hero {
        font-size: 2.6rem;
        line-height: 3rem;
    }
}

.carousel-wrapper {
    position: relative;
    height: 100px;
    margin: 2rem auto auto;
    width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden
}

.slide,
.slide-track,
.tabs-content.active {
    display: flex
}

.carousel-wrapper::after,
.carousel-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 15%;
    z-index: 1
}

.carousel-wrapper::before {
    left: 0
}

.carousel-wrapper::after {
    right: 0;
    transform: rotateZ(180deg)
}

.slide-track {
    width: calc(200px * 16);
    animation: 20s linear infinite slide
}

.slide-track:hover {
    animation-play-state: paused
}

.slide {
    align-items: center;
    padding: 0 10px
}

.carousel-wrapper .slide img {
    height: 3rem;
    width: 100%;
    filter: grayscale(100%);
    transition: .3s
}

.carousel-wrapper .slide img:hover {
    filter: grayscale(0)
}

.clients-carousel .slide-track {
    width: calc(250px * 25)
}

/* Cards */
.card-content {
    border: 1px solid #DBDBDB;
    border-radius: 20px 20px 0 0;
}

.card-image {
    border-radius: 0 0 20px 20px;
}

.card-hover {
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: var(--primary-200);
    box-shadow: 0 20px 40px rgba(5, 58, 91, 0.12);
}

.blue-bg-overlay {
    background: linear-gradient(135deg,
            rgba(2, 24, 38, 0.92) 0%,
            rgba(4, 41, 65, 0.85) 35%,
            rgba(2, 24, 38, 0.8) 60%,
            rgba(1, 15, 24, 0.95) 100%);
    pointer-events: none;
}

.video-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.77777778vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Accordion */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        padding-top 0.3s ease;
}

.accordion-item.active .accordion-content {
    opacity: 1;
}

.accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    color: var(--grey-600);
    transition: color .3s ease;
}

.accordion-item.active .accordion-icon {
    color: var(--primary);
}

.accordion-btn {
    transition: background-color .25s ease;
}

.accordion-btn:hover {
    background: #f9fafb;
}

.accordion-item.active {
    background: #f9fafb;
}

/* Belt-and-braces clip for the GSAP horizontal-scroll section: the
   .cards-wrapper below is intentionally several thousand px wide, and
   previously only a Tailwind utility class (overflow-hidden) contained
   it. Declaring the clip as a real rule (plus a hard width cap) stops
   that width from ever leaking into the document's scrollable area,
   which is what was pushing the fixed #stickyHeader off-screen on
   mobile. */
.horizontal-section {
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    max-width: 100vw;
}

.cards-wrapper {
    width: max-content;
}

/* .card {
    width: 380px;
    height: 420px;
    border: 1px solid #DBDBDB;
} */

@keyframes slide {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(calc(-200px * 8))
    }
}

@media (min-width: 768px) {
    .card-content {
        border-radius: 20px 0 0 20px;
    }

    .card-image {
        border-radius: 0 20px 20px 0;
    }
}

@media (min-width:1024px) {
    .carousel-wrapper .slide img {
        height: 3rem;
    }

    .main-heading {
        font-size: 2.5rem;
    }

    .text {
        font-size: 1.1rem;
        line-height: 1.6rem;
    }
}

@media (min-width:1280px) {

    .slide {
        min-width: 200px
    }

    .carousel-wrapper .slide img {
        height: 4.4rem;
    }

    .card-content {
        border-radius: 20px 20px 0 0;
    }

    .card-image {
        border-radius: 0 0 20px 20px;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1280px !important;
    }

    /* .main-heading {
        font-size: 2.8rem;
        line-height: 3.2rem;
    } */
}

@media (min-width: 1600px) {
    .container {
        max-width: 1540px !important;
    }
}


/* Floating toggle */

.hm-floating-toggle {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 200;
    display: inline-flex;
    gap: 0.25rem;
    background: var(--bright);
    border: 1px solid var(--grey-200);
    border-radius: 9999px;
    padding: 0.25rem;
    box-shadow: 0 16px 34px rgba(5, 58, 91, 0.14);

    /* Hidden by default: shifted down + invisible, matching
       #stickyHeader's translateY approach but away from its own edge */
    opacity: 0;
    transform: translateY(0.75rem);
    pointer-events: none;
    transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hm-floating-toggle.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .hm-floating-toggle {
        transition: opacity 1ms linear !important;
        transform: none !important;
    }
}

.hm-float-tab {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem .7rem;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: var(--fw-medium);
    color: var(--grey-700);
    cursor: pointer;
    transition: color 240ms ease;
}

.hm-float-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.hm-float-tab.is-active {
    color: var(--bright);
}

.hm-float-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Sliding pill behind the active tab, positioned via JS (left/width) */
.hm-float-indicator {
    position: absolute;
    z-index: 1;
    top: 0.35rem;
    left: 0.35rem;
    height: calc(100% - 0.7rem);
    width: 0;
    border-radius: 9999px;
    background: var(--primary);
    transition: left 320ms cubic-bezier(0.65, 0, 0.35, 1),
        width 320ms cubic-bezier(0.65, 0, 0.35, 1);
}

@media (max-width: 640px) {
    .hm-floating-toggle {
        left: 0.75rem;
        bottom: 0.75rem;
    }
}

/* Machine view ---------------------------------------------------------
   A full-page takeover shown in place of <main> while Machine mode is
   active. Display only: no links or buttons live inside this view. */

.hm-machine-view {
    position: fixed;
    inset: 0;
    z-index: 90;
    overflow-y: auto;
    background: var(--light-gray);
}

.hm-machine-inner {
    padding: 7.5rem 0 6rem;
}

/* Machine panel: dark code viewer ------------------------------------ */

.hm-code {
    border-radius: 24px;
    overflow: hidden;
    background: #111111;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

.hm-code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hm-code-filename {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #d1d5db;
}

.hm-code-filename svg {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
    flex-shrink: 0;
}

.hm-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: var(--fw-medium);
    border-radius: 9999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: background-color 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.hm-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.hm-copy-btn:focus-visible {
    outline: 2px solid var(--bright);
    outline-offset: 2px;
}

.hm-copy-btn.is-copied {
    background: rgba(58, 201, 110, 0.15);
    border-color: rgba(58, 201, 110, 0.4);
    color: #86efac;
}

.hm-copy-icon {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
}

.hm-code-scroll {
    max-height: 65vh;
    overflow: auto;
}

.hm-pre {
    margin: 0;
    padding: 1.25rem 0;
}

.hm-code-block {
    display: block;
    font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: #e5e7eb;
    tab-size: 2;
    white-space: pre;
}

/* Line-number gutter, generated via CSS counters against .hm-line spans
   that the JS module wraps each generated code line in */
.hm-code-block {
    counter-reset: hm-line;
}

.hm-line {
    display: block;
    padding: 0 1.5rem 0 3.75rem;
    position: relative;
}

.hm-line::before {
    counter-increment: hm-line;
    content: counter(hm-line);
    position: absolute;
    left: 0;
    width: 2.75rem;
    text-align: right;
    color: #4b5563;
    user-select: none;
}

/* Syntax token colors, tuned against the #111111 panel already used
   elsewhere on this page (compare table, App Display) for consistency */
.hm-tk-tag {
    color: #ff8a70;
}

.hm-tk-attr {
    color: #7dd3fc;
}

.hm-tk-string {
    color: #86efac;
}

.hm-tk-comment {
    color: #6b7280;
    font-style: italic;
}

.hm-tk-punct {
    color: #9ca3af;
}

.hm-tk-text {
    color: #d1d5db;
}

/* Custom scrollbars for the code viewer, matching the dark theme */
.hm-code-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.hm-code-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.hm-code-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
}

.hm-code-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 640px) {
    .hm-machine-inner {
        padding: 6.5rem 0 5rem;
    }

    .hm-line {
        padding-left: 3rem;
    }

    .hm-line::before {
        width: 2.1rem;
    }
}