/* ==========================================================================
   THREE SOLUTIONS — Atom Components
   Buttons · Tags · Eyebrow · Avatar · Nav
   ========================================================================== */

/* ---- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1.35;
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    max-width: 100%;
    min-height: 44px;
}

.btn:focus-visible {
    outline: 2px solid var(--color-cyan);
    outline-offset: 3px;
}

/* Primary */
.btn-primary {
    background-color: var(--color-cyan);
    color: var(--color-white);
    border-color: var(--color-cyan);
}
.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--color-navy);
    border-color: var(--color-navy);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Outline */
.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-gray-200);
}
.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
}

/* Ghost (for dark backgrounds) */
.btn-ghost {
    background-color: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, .25);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
    background-color: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .5);
}

/* Sizes */
.btn--sm  { padding: 10px 20px; font-size: var(--font-size-sm); }
.btn--lg  { padding: 18px 36px; font-size: var(--font-size-lg); }

/* ---- Tags / Badges ------------------------------------------------------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.4;
    text-decoration: none;
}

.tag--green {
    background-color: var(--color-green-light);
    color: var(--color-green-dark);
}
.tag--cyan {
    background-color: var(--color-navy-light);
    color: var(--color-navy);
}
.tag--navy {
    background-color: var(--color-anthracite);
    color: var(--color-white);
}
.tag--white {
    background-color: rgba(255, 255, 255, .15);
    color: var(--color-white);
}

/* ---- Eyebrow Label ------------------------------------------------------- */
.eyebrow {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--color-cyan);
    line-height: 1;
}

.eyebrow--white { color: rgba(255, 255, 255, .7); }
.eyebrow--green { color: var(--color-green); }

/* ---- Avatar -------------------------------------------------------------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background-color: rgba(6, 170, 222, .15);
    color: var(--color-cyan);
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar--sm { width: 36px; height: 36px; font-size: 12px; }

/* ---- Breadcrumb ---------------------------------------------------------- */
.breadcrumb {
    background: var(--color-off-white);
    border-bottom: 1px solid var(--color-gray-100);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: var(--space-sm) var(--space-lg);
    margin: 0 auto;
    max-width: var(--container-max);
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    color: var(--color-gray-300);
    font-size: 12px;
    font-weight: var(--font-weight-normal);
}

.breadcrumb li a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .2s;
}

.breadcrumb li a:hover { color: var(--color-cyan); }

.breadcrumb li[aria-current="page"] {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* ---- Navigation ---------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-100);
    transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(26,32,40,.06); }
.nav-primary { height: var(--nav-height); gap: 24px; position: relative; }
.nav-logo { flex-shrink: 0; display: flex; align-items: center; text-decoration: none; }
.nav-logo img, .nav-logo svg { height: 44px; width: auto; }
.nav-logo__text { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); color: var(--color-anthracite-dark); letter-spacing: -.02em; }
.nav-menu { flex: 1; display: flex; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { white-space: nowrap; }
.nav-links > li > a, .ts-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.nav-links > li > a:hover, .ts-nav-toggle:hover, .ts-nav-toggle[aria-expanded="true"] { background: #f1f5f7; color: #225b72; }
.nav-links > li > a[aria-current="page"], .ts-nav-toggle.is-current-ancestor { background: #edf4f6; color: #225b72; }
.nav-cta { flex-shrink: 0; }
.ts-nav-parent { display: flex; }
.ts-nav-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; flex-shrink: 0; }
.ts-nav-toggle[aria-expanded="true"] .ts-nav-chevron { transform: translateY(2px) rotate(225deg); }
.ts-nav-panel[hidden] { display: none; }
.ts-nav-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, calc(100vw - 40px));
    padding: 24px;
    border: 1px solid #dfe7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(26,32,40,.12);
    max-height: calc(100dvh - 148px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.ts-nav-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.ts-nav-eyebrow { margin: 0; color: #576570; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; }
.ts-nav-panel a { text-decoration: none; }
.ts-nav-overview { display: inline-flex; align-items: center; min-height: 44px; color: #225b72; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ts-nav-overview:hover { text-decoration: underline; text-underline-offset: 4px; }
.ts-nav-service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ts-nav-service-grid > li { min-width: 0; white-space: normal; }
.ts-nav-service-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px; border: 1px solid transparent; border-radius: 10px; background: #f6f8f9; color: var(--color-text); transition: background-color .15s ease, border-color .15s ease; }
.ts-nav-service-card:hover, .ts-nav-service-card[aria-current="page"] { border-color: #c5d9e2; background: #edf4f6; }
.ts-nav-service-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 600; line-height: 1.45; color: #1a2028; }
.ts-nav-arrow { position: relative; width: 9px; height: 9px; margin-right: 2px; border-top: 1.5px solid #316b82; border-right: 1.5px solid #316b82; flex-shrink: 0; }
.ts-nav-arrow::after { content: ''; position: absolute; width: 12px; height: 1.5px; right: -1px; top: -1px; background: #316b82; transform: rotate(-45deg); transform-origin: right center; }
.ts-nav-service-description { max-width: 34ch; color: #576570; font-size: 13px; font-weight: 400; line-height: 1.6; }
.ts-nav-panel-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; padding-top: 12px; border-top: 1px solid #e5ebee; }
.ts-nav-panel-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #304b5a; font-size: 13px; font-weight: 600; line-height: 1.5; }
.ts-nav-panel-footer a:hover, .ts-nav-panel-footer a[aria-current="page"] { color: #225b72; text-decoration: underline; text-underline-offset: 4px; }
.ts-menu-open #ts-cookie-banner { visibility: hidden !important; pointer-events: none; }

/* Mobile dialog uses the same concise service choices. */
.nav-hamburger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; background: #f1f5f7; border: 0; border-radius: 8px; cursor: pointer; padding: 0; }
.hamburger-bar { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: transform .15s ease, opacity .15s ease; }
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { position: fixed; inset: 0 0 0 auto; width: min(420px,100vw); padding: max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom)); background: #fff; visibility: hidden; z-index: 200; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.nav-mobile[aria-hidden="true"] { display: none; }
.nav-mobile:not([aria-hidden="true"]) { visibility: visible; }
.nav-mobile-top { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 24px; margin-bottom: 16px; border-bottom: 1px solid #e5ebee; }
.nav-mobile-home { display: flex; flex-direction: column; justify-content: center; min-height: 44px; color: #1a2028; font-size: 17px; font-weight: 700; line-height: 1.5; text-decoration: none; letter-spacing: -.02em; }
.nav-mobile-home span { color: #576570; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.nav-mobile-close { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid #e2e8ec; border-radius: 8px; background: #fff; color: #304b5a; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.nav-mobile-close span { font-size: 22px; line-height: 1; font-weight: 400; }
.nav-mobile-close:hover { background: #f1f5f7; }
.nav-mobile__links { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 2px; list-style: none; padding: 0 0 8px; margin: 0; overflow-y: auto; overscroll-behavior: contain; }
.nav-mobile__links > li > a, .nav-mobile__links .ts-nav-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 14px 8px; border: 0; border-radius: 8px; color: #1a2028; font-size: 20px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.nav-mobile__links > li > a:hover, .nav-mobile__links > li > a[aria-current="page"] { background: #edf4f6; color: #225b72; }
.nav-mobile-cta { flex-shrink: 0; margin-top: 16px; width: 100%; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(26,32,40,.42); z-index: 150; }
.nav-overlay.is-active { display: block; }
@media (max-width: 900px) {
    .nav-menu, .nav-cta { display: none; }
    .nav-hamburger { display: flex; }
    .nav-primary { gap: 16px; }
    .nav-mobile__links .ts-nav-panel { position: static; width: auto; transform: none; max-height: none; padding: 10px 0 16px; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    .nav-mobile__links .ts-nav-panel-head { display: block; margin: 0 8px 10px; }
    .nav-mobile__links .ts-nav-eyebrow { font-size: 10px; }
    .nav-mobile__links .ts-nav-overview { font-size: 13px; }
    .nav-mobile__links .ts-nav-service-grid { grid-template-columns: minmax(0,1fr); gap: 6px; }
    .nav-mobile__links .ts-nav-service-card { padding: 12px 14px; gap: 4px; }
    .nav-mobile__links .ts-nav-service-name { font-size: 15px; }
    .nav-mobile__links .ts-nav-service-description { font-size: 12px; line-height: 1.5; max-width: none; }
    .nav-mobile__links .ts-nav-panel-footer { display: grid; gap: 0; margin: 12px 8px 0; padding-top: 6px; }
    .nav-mobile__links .ts-nav-panel-footer a { font-size: 13px; }
    .admin-bar .nav-mobile { padding-top: 56px; }
}
@media (min-width: 901px) and (max-width: 1050px) {
    .nav-primary { gap: 16px; }
    .nav-links { gap: 2px; }
    .nav-links > li > a, .ts-nav-toggle { padding-inline: 10px; }
    .nav-cta { padding-inline: 16px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .site-header, .ts-nav-toggle, .ts-nav-chevron, .ts-nav-service-card, .hamburger-bar { transition: none; }
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-anthracite-dark);
    color: rgba(255, 255, 255, .75);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(4, 1fr);
    gap: var(--space-xl);
}

.footer-grid > * { min-width: 0; }
.ts-service-flow { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.ts-service-flow li { counter-increment: step; padding: 24px; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; color: #263343; font-weight: 600; }
.ts-service-flow li::before { content: counter(step); display: block; font-size: 28px; line-height: 1.3; color: #075985; margin-bottom: 12px; }
.ts-article-service { padding: 24px; margin-top: 32px; background: #f4f6f8; border-left: 4px solid #075985; }
.ts-project-preview { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; margin-bottom: 20px; background: #f4f6f8; }
.ts-project-figure img { width: 100%; height: auto; }
.ts-project-figure figcaption { font-size: 14px; color: #455568; margin-top: 10px; }
.admin-bar .site-header { top: 32px; }
@media(max-width:782px){.admin-bar .site-header{top:46px;}}
@media(max-width:640px){.ts-service-flow{grid-template-columns:1fr;gap:12px}.ts-service-flow li{padding:18px;}}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-lg); }
.footer-address { font-style: normal; line-height: 1.7; color: var(--color-white); }
.footer-contact { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: .2em; }

.footer-logo img,
.footer-logo svg { height: 40px; width: auto; }
.footer-logo__text {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
}

.footer-tagline {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, .75);
    line-height: var(--line-height-normal);
}

.footer-social { display: flex; gap: var(--space-md); }
.footer-social a {
    color: rgba(255, 255, 255, .75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: color .2s;
}
.footer-social a:hover { color: var(--color-cyan); }

.footer-links__title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: var(--space-md);
}

.footer-links ul { display: flex; flex-direction: column; gap: var(--space-sm); list-style: none; }
.footer-links a {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, .75);
    display: inline-block;
    padding-block: 6px;
    text-decoration: none;
    transition: color .2s;
}
.footer-links a:hover { color: var(--color-cyan); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-block: var(--space-lg);
}

.footer-copyright { font-size: var(--font-size-sm); color: rgba(255, 255, 255, .75); }

.footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-lg); }
.footer-legal a {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    transition: color .2s;
}
.footer-legal a:hover { color: var(--color-white); }

/* Cookie Bar */
.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-anthracite);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: var(--space-md) 0;
    z-index: 500;
}

.cookie-bar p { color: rgba(255,255,255,.7); font-size: var(--font-size-sm); margin: 0; }
.cookie-bar a { color: var(--color-cyan); text-decoration: underline; }
.cookie-bar__actions { display: flex; gap: var(--space-sm); flex-shrink: 0; }

/* Responsive Footer */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom .flex-between { flex-direction: column; gap: var(--space-md); text-align: center; }
}
