/*
Theme Name: The Best Digital Services
Theme URI: https://thebestdigitalservices.com/
Author: The Best Digital Services
Description: Bespoke, performance-focused agency theme for The Best Digital Services.
Version: 1.0.4
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: tbds
*/

:root {
  --ink: #080a0f;
  --ink-soft: #10131b;
  --surface: #f2f0ea;
  --paper: #faf9f6;
  --line: rgba(8, 10, 15, 0.16);
  --line-dark: rgba(255, 255, 255, 0.16);
  --text: #11131a;
  --muted: #5d616d;
  --light: #f8f7f3;
  --light-muted: #aeb4c2;
  --blue: #365cff;
  --coral: #ff5a3d;
  --lime: #d9ff69;
  --success: #137a4a;
  --error: #b3261e;
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(5rem, 10vw, 9rem);
  --radius-sm: 0.75rem;
  --radius: 1.5rem;
  --radius-lg: 2.5rem;
  --shadow: 0 24px 80px rgba(7, 11, 24, 0.16);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--lime); color: var(--ink); }

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 9999;
  padding: .75rem 1rem; background: #fff; color: #000;
  transform: translateY(-160%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.tbds-shell { width: min(100% - (2 * var(--gutter)), var(--container)); margin-inline: auto; }
.tbds-section { padding-block: var(--section); }
.tbds-section--dark { color: var(--light); background: var(--ink); }
.tbds-eyebrow {
  display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 1rem;
  color: inherit; font-size: .75rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase;
}
.tbds-eyebrow::before { width: 1.75rem; height: 2px; background: var(--coral); content: ""; }
.tbds-display {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500;
  font-size: clamp(3rem, 7.2vw, 7.6rem); line-height: .94; letter-spacing: -.055em;
}
.tbds-heading {
  max-width: 17ch; margin: 0; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5.6vw, 5.6rem); font-weight: 500; line-height: .98; letter-spacing: -.045em;
}
.tbds-heading em, .tbds-display em { color: var(--blue); font-weight: inherit; }
.tbds-section--dark .tbds-heading em, .tbds-section--dark .tbds-display em { color: var(--lime); }
.tbds-lead { max-width: 44rem; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.tbds-section--dark .tbds-lead { color: var(--light-muted); }

.tbds-button {
  min-height: 3.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  padding: .8rem 1.25rem; border: 1px solid transparent; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 750; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s ease, color .25s ease, border-color .25s ease;
}
.tbds-button svg { width: 1rem; transition: transform .25s var(--ease); }
.tbds-button:hover { transform: translateY(-2px); background: #2148f2; }
.tbds-button:hover svg { transform: translateX(3px); }
.tbds-button--light { background: var(--light); color: var(--ink); }
.tbds-button--light:hover { background: var(--lime); }
.tbds-button--ghost { border-color: currentColor; background: transparent; color: inherit; }
.tbds-button--ghost:hover { border-color: var(--blue); background: var(--blue); color: #fff; }

/* Header */
.tbds-header {
  position: fixed; inset: 0 0 auto; z-index: 1000; color: #fff;
  border-bottom: 1px solid transparent; transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.tbds-header.is-scrolled { background: rgba(8, 10, 15, .86); border-color: var(--line-dark); backdrop-filter: blur(16px); }
.tbds-header__inner { min-height: 5.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.tbds-brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.tbds-brand__mark { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; }
.tbds-brand__name { max-width: 9rem; font-size: .8rem; font-weight: 800; line-height: 1.12; letter-spacing: .02em; }
.tbds-nav { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2rem); }
.tbds-nav a { color: #fff; font-size: .9rem; font-weight: 650; text-decoration: none; }
.tbds-nav a.tbds-button--light { color: var(--ink); }
.tbds-nav > a:not(.tbds-button) { position: relative; padding-block: .5rem; }
.tbds-nav > a:not(.tbds-button)::after { position: absolute; inset: auto 0 0; height: 1px; background: var(--coral); content: ""; transform: scaleX(0); transform-origin: right; transition: transform .25s var(--ease); }
.tbds-nav > a:not(.tbds-button):hover::after { transform: scaleX(1); transform-origin: left; }
.tbds-nav-toggle { display: none; width: 3rem; height: 3rem; border: 1px solid var(--line-dark); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.tbds-nav-toggle span, .tbds-nav-toggle::before, .tbds-nav-toggle::after { display: block; width: 1.15rem; height: 1px; margin: 4px auto; background: currentColor; content: ""; transition: transform .2s ease, opacity .2s ease; }
.nav-open .tbds-nav-toggle span { opacity: 0; }
.nav-open .tbds-nav-toggle::before { transform: translateY(5px) rotate(45deg); }
.nav-open .tbds-nav-toggle::after { transform: translateY(-5px) rotate(-45deg); }

/* Hero */
.tbds-hero { min-height: 100svh; position: relative; display: grid; align-items: end; overflow: hidden; color: #fff; background: var(--ink); }
.tbds-hero__art { position: absolute; inset: 0; }
.tbds-hero__art::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,15,.98) 0%, rgba(8,10,15,.82) 38%, rgba(8,10,15,.12) 76%, rgba(8,10,15,.25) 100%), linear-gradient(0deg, rgba(8,10,15,.68), transparent 45%); content: ""; }
.tbds-hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.tbds-hero__grid { position: absolute; inset: 0; opacity: .24; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 7.5vw 7.5vw; mask-image: linear-gradient(to bottom, black, transparent 84%); }
.tbds-hero__inner { position: relative; z-index: 2; padding-top: 9rem; padding-bottom: clamp(3rem, 8vh, 6rem); }
.tbds-hero__copy { max-width: 56rem; }
.tbds-hero .tbds-eyebrow { color: #d7dae3; }
.tbds-hero .tbds-display { max-width: 10ch; text-wrap: balance; }
.tbds-hero .tbds-display em { color: var(--coral); }
.tbds-hero__sub { max-width: 42rem; margin: 1.75rem 0 0; color: #c8ccd6; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.tbds-hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.tbds-hero__meta { margin-top: clamp(3rem, 8vh, 6rem); display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; color: #aeb4c2; font-size: .85rem; }
.tbds-hero__meta span { display: inline-flex; align-items: center; gap: .55rem; }
.tbds-hero__meta span::before { width: .45rem; height: .45rem; border-radius: 50%; background: var(--lime); content: ""; box-shadow: 0 0 0 4px rgba(217,255,105,.12); }

/* Signal strip */
.tbds-signal { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--lime); }
.tbds-signal__track { width: max-content; display: flex; gap: 2rem; padding: 1rem 0; animation: tbds-marquee 30s linear infinite; }
.tbds-signal__item { display: flex; align-items: center; gap: 2rem; color: var(--ink); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tbds-signal__item::after { content: "✦"; font-size: .7rem; }
@keyframes tbds-marquee { to { transform: translateX(-50%); } }

/* Intro */
.tbds-intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 8vw, 8rem); align-items: start; }
.tbds-intro__answer { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4.2vw, 4.2rem); line-height: 1.06; letter-spacing: -.035em; }
.tbds-intro__body p { margin: 0 0 1.25rem; color: var(--muted); font-size: 1.06rem; }
.tbds-market-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.tbds-market-list span { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 750; }

/* Services */
.tbds-section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.tbds-section-head__aside { max-width: 25rem; color: var(--light-muted); }
.tbds-services { border-top: 1px solid var(--line-dark); }
.tbds-service { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(16rem, .65fr) 3rem; gap: 1.25rem; align-items: center; padding: 2rem 0; border-bottom: 1px solid var(--line-dark); transition: padding .3s var(--ease), color .3s ease; }
.tbds-service:hover { padding-inline: 1rem; color: var(--lime); }
.tbds-service__num { color: var(--coral); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.tbds-service h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3.5vw, 3.4rem); font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.tbds-service p { margin: 0; color: var(--light-muted); font-size: .95rem; }
.tbds-service__icon { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; transition: transform .3s var(--ease), background .3s ease; }
.tbds-service:hover .tbds-service__icon { transform: rotate(-35deg); background: var(--blue); color: #fff; }

/* Work */
.tbds-work { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.tbds-work__visual { position: relative; min-height: clamp(24rem, 53vw, 42rem); overflow: hidden; border-radius: var(--radius-lg); background: #e9ebee; box-shadow: var(--shadow); }
.tbds-work__visual img { width: 100%; height: 112%; object-fit: cover; object-position: top center; will-change: transform; }
.tbds-work__tag { position: absolute; top: 1.25rem; left: 1.25rem; padding: .55rem .8rem; border-radius: 999px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); font-size: .75rem; font-weight: 800; }
.tbds-work__copy h3 { margin: .8rem 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.tbds-work__copy p { color: var(--muted); }
.tbds-work__facts { margin: 2rem 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tbds-work__facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tbds-work__facts span:first-child { color: var(--muted); }

/* Process */
.tbds-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 4rem; background: var(--line-dark); border: 1px solid var(--line-dark); }
.tbds-step { min-height: 20rem; position: relative; padding: 1.5rem; background: var(--ink); }
.tbds-step__num { color: var(--coral); font-size: .75rem; font-weight: 850; }
.tbds-step h3 { margin: 5rem 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 500; line-height: 1.1; }
.tbds-step p { margin: 0; color: var(--light-muted); font-size: .92rem; }

/* Markets */
.tbds-markets { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 8vw, 8rem); align-items: start; }
.tbds-market-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tbds-market { min-height: 12rem; padding: 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tbds-market span { color: var(--coral); font-size: .72rem; font-weight: 850; letter-spacing: .1em; }
.tbds-market h3 { margin: 2.5rem 0 .5rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 500; }
.tbds-market p { margin: 0; color: var(--muted); font-size: .88rem; }

/* Principles */
.tbds-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.tbds-principle { padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.45); }
.tbds-principle svg { width: 2rem; color: var(--blue); }
.tbds-principle h3 { margin: 3rem 0 .75rem; font-size: 1.1rem; }
.tbds-principle p { margin: 0; color: var(--muted); font-size: .92rem; }

/* FAQ */
.tbds-faq { max-width: 58rem; margin: 3rem 0 0 auto; border-top: 1px solid var(--line-dark); }
.tbds-faq details { border-bottom: 1px solid var(--line-dark); }
.tbds-faq summary { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 0; font-size: 1.1rem; font-weight: 700; cursor: pointer; list-style: none; }
.tbds-faq summary::-webkit-details-marker { display: none; }
.tbds-faq summary::after { content: "+"; color: var(--lime); font-size: 1.8rem; font-weight: 400; transition: transform .2s ease; }
.tbds-faq details[open] summary::after { transform: rotate(45deg); }
.tbds-faq details p { max-width: 46rem; margin: 0; padding: 0 3rem 1.5rem 0; color: var(--light-muted); }

/* Contact */
.tbds-contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(20rem, 1.15fr); gap: clamp(2rem, 8vw, 8rem); align-items: start; }
.tbds-contact__intro .tbds-heading { max-width: 10ch; }
.tbds-contact__channels { display: grid; gap: .75rem; margin-top: 2rem; }
.tbds-contact__channel { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.tbds-contact__channel svg { width: 1.25rem; color: var(--coral); }
.tbds-form { padding: clamp(1.25rem, 3vw, 2.25rem); border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(255,255,255,.045); }
.tbds-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tbds-field { display: grid; gap: .45rem; margin-bottom: 1rem; }
.tbds-field--full { grid-column: 1 / -1; }
.tbds-field label { font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.tbds-field input, .tbds-field textarea, .tbds-field select { width: 100%; min-height: 3.35rem; padding: .8rem 1rem; border: 1px solid var(--line-dark); border-radius: .75rem; background: rgba(255,255,255,.07); color: #fff; }
.tbds-field textarea { min-height: 8rem; resize: vertical; }
.tbds-field input::placeholder, .tbds-field textarea::placeholder { color: #8e94a2; }
.tbds-field input:focus, .tbds-field textarea:focus, .tbds-field select:focus { border-color: var(--lime); outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(217,255,105,.18); }
.tbds-field select option { color: #111; }
.tbds-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.tbds-form__note { margin: .75rem 0 0; color: var(--light-muted); font-size: .78rem; }
.tbds-alert { margin-bottom: 1rem; padding: .85rem 1rem; border-radius: .75rem; font-size: .9rem; }
.tbds-alert--success { background: rgba(30, 177, 103, .15); color: #aaf0cb; }
.tbds-alert--error { background: rgba(255, 90, 61, .14); color: #ffb6aa; }

/* Footer */
.tbds-footer { color: var(--light); background: #050609; border-top: 1px solid var(--line-dark); }
.tbds-footer__top { display: grid; grid-template-columns: 1.2fr repeat(2, .6fr); gap: 3rem; padding-block: 4rem; }
.tbds-footer__statement { max-width: 24rem; margin: 1.5rem 0 0; color: var(--light-muted); }
.tbds-footer h2 { margin: 0 0 1rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.tbds-footer ul { margin: 0; padding: 0; list-style: none; }
.tbds-footer li + li { margin-top: .6rem; }
.tbds-footer a { color: var(--light-muted); text-decoration: none; }
.tbds-footer a:hover { color: #fff; }
.tbds-footer__bottom { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; border-top: 1px solid var(--line-dark); color: #868c99; font-size: .78rem; }

/* Reveal enhancement */
.js .tbds-reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.js .tbds-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .tbds-nav-toggle { display: block; }
  .tbds-nav { position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1rem; padding: 7rem var(--gutter) 3rem; background: var(--ink); opacity: 0; visibility: hidden; transform: translateY(-1rem); transition: opacity .25s ease, visibility .25s ease, transform .25s var(--ease); }
  .nav-open .tbds-nav { opacity: 1; visibility: visible; transform: translateY(0); }
  .tbds-nav > a:not(.tbds-button) { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 8vw, 4rem); font-weight: 500; }
  .tbds-intro, .tbds-markets, .tbds-contact { grid-template-columns: 1fr; }
  .tbds-service { grid-template-columns: 3rem 1fr 3rem; }
  .tbds-service p { grid-column: 2 / -1; }
  .tbds-work { grid-template-columns: 1fr; }
  .tbds-process { grid-template-columns: repeat(2, 1fr); }
  .tbds-principles { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.1rem; --section: 4.5rem; --radius-lg: 1.5rem; }
  .tbds-header__inner { min-height: 4.75rem; }
  .tbds-brand__name { max-width: 7.5rem; font-size: .7rem; }
  .tbds-hero__inner { padding-top: 7.5rem; }
  .tbds-hero__art img { object-position: 68% center; opacity: .82; }
  .tbds-hero__art::after { background: linear-gradient(0deg, rgba(8,10,15,.96) 8%, rgba(8,10,15,.54) 80%), linear-gradient(90deg, rgba(8,10,15,.78), rgba(8,10,15,.1)); }
  .tbds-hero .tbds-display { font-size: clamp(3.1rem, 15vw, 4.8rem); }
  .tbds-hero__actions .tbds-button { width: 100%; }
  .tbds-hero__meta { display: grid; gap: .6rem; }
  .tbds-section-head { display: block; }
  .tbds-section-head__aside { margin-top: 1.5rem; }
  .tbds-service { grid-template-columns: 2.3rem 1fr 2.6rem; gap: .7rem; }
  .tbds-service:hover { padding-inline: 0; }
  .tbds-service p { grid-column: 1 / -1; }
  .tbds-work__visual { min-height: 24rem; }
  .tbds-process { grid-template-columns: 1fr; }
  .tbds-step { min-height: auto; }
  .tbds-step h3 { margin-top: 3rem; }
  .tbds-market-grid, .tbds-principles, .tbds-form__grid { grid-template-columns: 1fr; }
  .tbds-field--full { grid-column: auto; }
  .tbds-footer__top { grid-template-columns: 1fr; }
  .tbds-footer__bottom { display: grid; }
}

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

@media (forced-colors: active) {
  .tbds-button, .tbds-field input, .tbds-field textarea, .tbds-field select { border: 1px solid ButtonText; }
}
