/* ==========================================================
   TT STUDIOS — site styles
   Sections: 1 tokens · 2 base · 3 layout · 4 header/nav · 5 buttons
             6 hero · 7 cards · 8 portfolio · 9 pricing · 10 forms
             11 footer · 12 motion · 13 responsive
   ========================================================== */

/* 1. TOKENS ------------------------------------------------ */
:root {
  --navy-950: #060f1f;
  --navy-900: #0b1b36;   /* primary */
  --navy-800: #102548;
  --navy-700: #16305a;   /* secondary */
  --silver-100: #e6eaef;
  --silver-300: #b8c0cb; /* accent */
  --silver-500: #8f99a6;
  --line: rgba(184, 192, 203, 0.18);
  --white: #ffffff;

  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Raleway", "Segoe UI", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 140px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. BASE -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--silver-100);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  color: var(--white);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--silver-300); outline-offset: 3px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--white); color: var(--navy-900); padding: 10px 16px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { top: 12px; }

/* 3. LAYOUT ------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--alt { background: var(--navy-950); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--silver-300);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--silver-300); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--silver-300); max-width: 640px; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lead { margin-inline: auto; }
.silver-text {
  background: linear-gradient(120deg, #ffffff 0%, #b8c0cb 55%, #8f99a6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 4. HEADER / NAV ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 27, 54, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: auto; }
.brand-name {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.2em; color: var(--white);
}
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; font-family: var(--font-head); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver-300);
  padding: 8px 0; transition: color 0.25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 100%;
  background: var(--silver-100); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle {
  display: none; width: 48px; height: 48px; background: none; border: 1px solid var(--line);
  color: var(--white); cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 1.5px; background: currentColor; position: relative;
  transition: transform 0.3s var(--ease), background 0.2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* 5. BUTTONS ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 32px; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--silver-300); background: transparent; color: var(--white);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--white); }
.btn--solid {
  background: linear-gradient(120deg, #f4f6f9 0%, #c3cad3 55%, #9aa3b0 100%);
  color: var(--navy-900); border-color: transparent;
}
.btn--solid:hover { background: var(--white); color: var(--navy-900); border-color: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.link-arrow {
  font-family: var(--font-head); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--white); display: inline-flex; gap: 10px; align-items: center;
  border-bottom: 1px solid var(--silver-500); padding-bottom: 4px; transition: gap 0.3s var(--ease);
}
.link-arrow:hover { gap: 16px; }

/* 6. HERO -------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(56px, 9vw, 110px) 0 clamp(72px, 10vw, 130px);
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(34, 64, 112, 0.55), transparent 70%),
    var(--navy-900);
}
.hero::before, .hero::after {
  content: ""; position: absolute; left: 50%; width: 1px; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--silver-500), transparent); opacity: 0.4;
}
.hero::before { top: 0; }
.hero::after { bottom: 0; transform: rotate(180deg); }
.hero-logo { width: clamp(260px, 36vw, 400px); margin: 0 auto clamp(28px, 4vw, 48px); }
.hero h1 { margin-bottom: 0.35em; }
.hero .lead { margin: 0 auto 40px; }
.hero .btn-row { justify-content: center; }
.hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.hero-orbs i {
  position: absolute; border: 1px solid var(--line); border-radius: 50%;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero-orbs i:nth-child(1) { width: 520px; height: 520px; left: -200px; top: 10%; }
.hero-orbs i:nth-child(2) { width: 360px; height: 360px; right: -120px; top: 45%; animation-delay: -6s; }
.hero-orbs i:nth-child(3) { width: 220px; height: 220px; right: 14%; top: 6%; animation-delay: -11s; }

.page-hero { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(34, 64, 112, 0.4), transparent 70%), var(--navy-900); }
.page-hero .lead { margin-bottom: 0; }

/* 7. CARDS ------------------------------------------------- */
.card {
  position: relative; padding: 38px 32px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(184,192,203,0.45); background: rgba(255,255,255,0.05); }
.card .num { font-family: var(--font-head); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.22em; color: var(--silver-500); margin-bottom: 36px; display: block; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--silver-300); margin: 0; font-size: 1rem; }
.card ul { margin: 18px 0 0; padding: 0; list-style: none; color: var(--silver-300); font-size: 0.97rem; }
.card li { padding-left: 22px; position: relative; margin-bottom: 8px; }
.card li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--silver-300); }

.service-row {
  display: grid; grid-template-columns: 90px 1fr 1.1fr; gap: 32px; align-items: start;
  padding: 44px 0; border-top: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row .num { font-family: var(--font-head); color: var(--silver-500); letter-spacing: 0.2em; font-size: 0.85rem; padding-top: 8px; }
.service-row h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.service-row p { color: var(--silver-300); margin-bottom: 14px; }
.service-row ul { list-style: none; padding: 0; margin: 0; color: var(--silver-100); font-size: 0.97rem; }
.service-row li { padding: 8px 0 8px 22px; border-top: 1px solid var(--line); position: relative; }
.service-row li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 10px; height: 1px; background: var(--silver-300); }

.steps { counter-reset: step; }
.steps .card::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.22em;
  color: var(--silver-500); margin-bottom: 36px;
}

.cta-band { text-align: center; padding: clamp(64px, 9vw, 110px) 0; border-top: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 120% at 50% 100%, rgba(34, 64, 112, 0.5), transparent 70%), var(--navy-950); }
.cta-band .btn-row { justify-content: center; margin-top: 32px; }

/* 8. PORTFOLIO --------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip {
  min-height: 44px; padding: 0 20px; background: transparent; color: var(--silver-300); cursor: pointer;
  border: 1px solid var(--line); font-family: var(--font-head); font-weight: 500; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; transition: all 0.3s var(--ease);
}
.chip:hover { color: var(--white); border-color: var(--silver-300); }
.chip[aria-pressed="true"] { background: var(--silver-100); color: var(--navy-900); border-color: var(--silver-100); }
.work-grid { column-count: 3; column-gap: 24px; }
.work {
  position: relative; display: block; width: 100%; padding: 0; margin: 0 0 24px; border: 1px solid var(--line);
  background: var(--navy-950); cursor: pointer; overflow: hidden; text-align: left; color: inherit;
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
}
.work img { width: 100%; height: auto; transition: transform 0.7s var(--ease); }
.work:hover img { transform: scale(1.04); }
.work figcaption, .work .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 18px;
  background: linear-gradient(to top, rgba(6,15,31,0.92), transparent);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--white);
  transform: translateY(8px); opacity: 0; transition: all 0.4s var(--ease);
}
.work:hover .cap, .work:focus-visible .cap { transform: none; opacity: 1; }
.work[hidden] { display: none; }
.note { font-size: 0.92rem; color: var(--silver-500); border-left: 1px solid var(--silver-500); padding-left: 16px; max-width: 720px; }

dialog.lightbox {
  border: 1px solid var(--line); background: var(--navy-950); color: var(--white);
  padding: 0; max-width: min(92vw, 560px); width: 100%; max-height: 94vh; overflow: auto;
}
dialog.lightbox::backdrop { background: rgba(3, 8, 18, 0.88); backdrop-filter: blur(4px); }
dialog.lightbox img { width: auto; max-width: 100%; height: auto; max-height: calc(92vh - 64px); margin: 0 auto; object-fit: contain; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px;
  font-family: var(--font-head); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; }
.lightbox-bar button { min-height: 44px; min-width: 44px; background: none; border: 1px solid var(--line); color: var(--white); cursor: pointer; font-size: 1.1rem; }

/* 9. PRICING ----------------------------------------------- */
.price-card { display: flex; flex-direction: column; padding: 44px 34px; }
.price-card.featured { background: linear-gradient(180deg, rgba(34,64,112,0.5), rgba(255,255,255,0.03)); border-color: var(--silver-300); }
.badge { position: absolute; top: -13px; left: 34px; background: var(--silver-100); color: var(--navy-900);
  font-family: var(--font-head); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; padding: 6px 14px; }
.price { font-family: var(--font-head); font-weight: 600; font-size: clamp(2.8rem, 5vw, 3.6rem); color: var(--white); line-height: 1; margin: 18px 0 6px; }
.price small { font-size: 0.95rem; font-weight: 500; color: var(--silver-300); letter-spacing: 0.04em; }
.price-card .desc { min-height: 3.4em; }
.price-card ul { margin: 22px 0 36px; flex: 1; }
.price-card .btn { width: 100%; }

/* 10. FORMS ------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver-300); }
.field input, .field select, .field textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 52px; padding: 14px 16px; font: inherit; color: var(--white);
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 0;
  transition: border-color 0.25s, background 0.25s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--silver-300) 50%), linear-gradient(135deg, var(--silver-300) 50%, transparent 50%);
  background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--navy-900); color: var(--white); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--silver-300); background: rgba(255,255,255,0.07); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #e0a4a4; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-size: 0.98rem; }
.form-status.ok { color: #cfe8d5; }
.form-status.err { color: #f0c2c2; }
.form-note { font-size: 0.88rem; color: var(--silver-500); margin: 0; }
.info-block { padding: 28px 0; border-top: 1px solid var(--line); }
.info-block:first-child { border-top: 0; padding-top: 0; }
.info-block h3 { font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver-500); margin-bottom: 8px; font-weight: 500; }
.info-block a { color: var(--white); border-bottom: 1px solid var(--silver-500); }
.info-block p { margin: 0; }

/* 11. FOOTER ----------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--navy-950); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-grid h4 { font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver-500); font-weight: 500; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--silver-300); transition: color 0.2s; }
.footer-grid a:hover { color: var(--white); }
.footer-tag { font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--silver-300); margin-top: 14px; }
.legal { border-top: 1px solid var(--line); padding-top: 24px; font-size: 0.86rem; color: var(--silver-500); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* 12. MOTION ----------------------------------------------- */
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(30px, -26px); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero .hero-logo, .hero h1, .hero .lead, .hero .btn-row { animation: rise 1s var(--ease) both; }
.hero h1 { animation-delay: 0.15s; }
.hero .lead { animation-delay: 0.3s; }
.hero .btn-row { animation-delay: 0.45s; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

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

/* 13. RESPONSIVE ------------------------------------------- */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid { column-count: 2; }
  .service-row { grid-template-columns: 60px 1fr; }
  .service-row > div:last-child { grid-column: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .price-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; gap: 32px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; visibility: hidden; transition: max-height 0.45s var(--ease), visibility 0s 0.45s;
  }
  .nav-links.open { max-height: 420px; visibility: visible; transition: max-height 0.45s var(--ease); }
  .nav-links a { display: block; padding: 18px var(--gutter); border-top: 1px solid var(--line); font-size: 0.85rem; }
  .nav-links a::after { display: none; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .work-grid { column-count: 1; }
  .service-row { grid-template-columns: 1fr; gap: 14px; padding: 34px 0; }
  .service-row > div:last-child { grid-column: 1; }
  .btn-row .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.88rem; letter-spacing: 0.16em; }
}

/* 14. DEVICE POLISH --------------------------------------- */
html { -webkit-tap-highlight-color: rgba(184, 192, 203, 0.25); }
button { font-family: inherit; }
/* Touch screens have no hover: always show portfolio captions */
@media (hover: none) {
  .work .cap { opacity: 1; transform: none; }
  .card:hover, .btn:hover { transform: none; }
}
/* Large desktops and TVs */
@media (min-width: 1600px) {
  :root { --wrap: 1360px; }
  html { font-size: 112.5%; }
}
/* Very small phones */
@media (max-width: 360px) {
  .brand-name { letter-spacing: 0.1em; font-size: 0.8rem; }
  .btn { padding: 0 20px; letter-spacing: 0.14em; }
  .price-card { padding: 36px 24px; }
}
/* Phones turned sideways */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-top: 32px; }
  .nav-links { max-height: 0; }
  .nav-links.open { max-height: calc(100vh - 76px); overflow-y: auto; }
}
/* Email copy button */
.copy-btn {
  margin-left: 12px; min-height: 36px; padding: 0 14px; cursor: pointer; background: transparent; color: var(--silver-300);
  border: 1px solid var(--line); font-family: var(--font-head); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.copy-btn:hover { color: var(--white); border-color: var(--silver-300); }
