/* ============================================================
   TECHTAKES — shared design system (all redesigned pages)
   Tokens + chrome + components. Index additionally loads
   style.css (its own hero engine); values here match it 1:1.
   ============================================================ */

:root {
  --bg: #060709;
  --bg-soft: #0b0d11;
  --fg: #eef1f4;
  --fg-dim: #8a93a0;
  --accent: #4d7cff;
  --accent-2: #6ef3c5;
  --danger: #ff5c5c;
  --line: rgba(238, 241, 244, 0.1);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: initial; background: #060709; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; display: block; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
}

.accent { color: var(--accent); }

/* ---------- starfield canvas + grain ---------- */
.tt-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
.grain {
  position: fixed;
  inset: -100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- custom cursor ---------- */
.cursor, .cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(238, 241, 244, 0.35);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
}
.cursor.is-hover {
  width: 64px;
  height: 64px;
  border-color: var(--accent);
  background: rgba(77, 124, 255, 0.08);
}
.cursor-dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
}
@media (hover: none) {
  .cursor, .cursor-dot { display: none; }
}

/* ---------- shared header ---------- */
.tt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 3rem;
  transition: transform 0.45s ease, background 0.45s ease;
}
.tt-header.is-hidden { transform: translateY(-110%); }
.tt-header.is-solid {
  background: rgba(6, 7, 9, 0.72);
  backdrop-filter: blur(14px);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.28em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.tt-nav { display: flex; gap: 2.4rem; align-items: center; }
.tt-nav a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.tt-nav a:hover { color: var(--fg); }
.tt-nav a[aria-current="page"] { color: var(--fg); }
.tt-nav a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 4px;
  background: var(--accent);
}
.tt-header__auth { display: flex; align-items: center; gap: 0.9rem; }

/* hamburger */
.tt-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.tt-burger span {
  display: block;
  height: 1px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.tt-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tt-burger.is-open span:nth-child(2) { opacity: 0; }
.tt-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu overlay */
.tt-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(6, 7, 9, 0.96);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.tt-menu.is-open { opacity: 1; visibility: visible; }
.tt-menu a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 3.4rem);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}
.tt-menu a .mono { color: var(--accent); }
.tt-menu a[aria-current="page"] { color: var(--accent); }
.tt-menu__meta {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 2.2rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.btn--fill {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn--fill:hover { background: #6890ff; transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(238, 241, 244, 0.28);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--big { padding: 1.25rem 3.2rem; font-size: 0.95rem; }
.btn--small { padding: 0.65rem 1.5rem; font-size: 0.7rem; }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }

/* ---------- layout shells ---------- */
main { position: relative; z-index: 2; }

.section { position: relative; padding: 12vh 8vw; }
.section--tight { padding: 9vh 8vw; }
.section--page-top { padding-top: 24vh; }

.section-head { margin-bottom: 6vh; }
.section-index {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.section-title--sub {
  font-size: clamp(2rem, 5vw, 3.6rem);
}
.section-lede {
  margin-top: 1.6rem;
  max-width: 34rem;
  color: var(--fg-dim);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* line + generic reveals (same API as index engine) */
.line { display: block; overflow: hidden; }
.line__inner { display: block; transform: translateY(110%); }
.reveal { opacity: 0; transform: translateY(40px); }

/* ---------- cards / quotes ---------- */
.tt-card {
  border: 1px solid var(--line);
  background: rgba(11, 13, 17, 0.65);
  backdrop-filter: blur(6px);
  border-radius: 4px;
  padding: 2.6rem 2.2rem;
  transition: border-color 0.35s, transform 0.35s;
}
.tt-card:hover { border-color: var(--accent); }

/* ---------- stats strip (same as index) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat { background: var(--bg); padding: 3.4rem 2.4rem; transition: background 0.4s; }
.stat:hover { background: var(--bg-soft); }
.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1;
}
.stat__value em { font-style: normal; color: var(--accent); font-size: 0.55em; }
.stat__label { margin-top: 1rem; }

/* ---------- forms ---------- */
.tt-field { margin-bottom: 1.5rem; text-align: left; }
.tt-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.6rem;
}
.tt-input,
.tt-field input,
.tt-field select,
.tt-field textarea {
  width: 100%;
  background: rgba(11, 13, 17, 0.8);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.95rem 1.1rem;
  transition: border-color 0.25s, background 0.25s;
  appearance: none;
}
.tt-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a93a0' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
}
.tt-input:focus,
.tt-field input:focus,
.tt-field select:focus,
.tt-field textarea:focus {
  border-color: var(--accent);
  background: rgba(11, 13, 17, 1);
  outline: none;
}
.tt-field input::placeholder, .tt-input::placeholder { color: rgba(138, 147, 160, 0.55); }

.tt-error, .error-message { color: var(--danger); font-size: 0.85rem; font-weight: 400; }
.tt-success { color: var(--accent-2); font-size: 0.85rem; font-weight: 400; }

/* ---------- tables ---------- */
.tt-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.tt-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.tt-table th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 400;
  text-align: left;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 17, 0.8);
}
.tt-table td {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  font-size: 0.95rem;
}
.tt-table tr:last-child td { border-bottom: 0; }
.tt-table tr { transition: background 0.25s; }
.tt-table tbody tr:hover { background: rgba(11, 13, 17, 0.75); }

/* ---------- legacy data-script hooks ----------
   past-history-performance.js sets these classes on the elements
   it fills; give them design-system meanings. Scoped to the
   sections that host script-rendered content. */
.tt-legacy-data .f-white { color: var(--fg); }
.tt-legacy-data .f-green { color: var(--accent-2); }
.tt-legacy-data .f-red { color: var(--danger); }
.tt-legacy-data .text-center { text-align: center; }
.tt-legacy-data td.td-green span,
.tt-legacy-data td.td-red span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
}
.tt-legacy-data td.td-green span {
  color: var(--accent-2);
  background: rgba(110, 243, 197, 0.08);
  border: 1px solid rgba(110, 243, 197, 0.25);
}
.tt-legacy-data td.td-red span {
  color: var(--danger);
  background: rgba(255, 92, 92, 0.08);
  border: 1px solid rgba(255, 92, 92, 0.25);
}

/* ---------- packages (markup emitted by pricing.js) ---------- */
#packagesContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.6rem;
  align-items: stretch;
}
#packagesContainer > .col-md-4, #packagesContainer > .col-12 { width: auto; }
#packagesContainer .innerBox {
  height: 100%;
  border: 1px solid var(--line);
  background: rgba(11, 13, 17, 0.65);
  backdrop-filter: blur(6px);
  border-radius: 4px;
  padding: 2.4rem 2.1rem 2.6rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s, transform 0.35s;
}
#packagesContainer .innerBox:hover { border-color: var(--accent); transform: translateY(-6px); }
#packagesContainer .innerBox h6 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
}
#packagesContainer .innerBox h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 1.4rem;
}
#packagesContainer .innerBox h3 sup {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  text-transform: uppercase;
}
#packagesContainer .markerLi {
  list-style: none;
  color: var(--fg-dim);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 2rem;
  flex-grow: 1;
}
#packagesContainer .markerLi li { padding-left: 1.3rem; position: relative; }
#packagesContainer .markerLi li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
#packagesContainer .button-blue {
  display: inline-block;
  position: relative;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.95rem 2rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
#packagesContainer .button-blue:hover { background: #6890ff; transform: translateY(-2px); }
#packagesContainer .button-blue svg { display: none; }
#packagesContainer p.text-center { color: var(--fg-dim); }

/* pricing tabs (#myTab consumed by pricing.js) */
.tt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin-bottom: 3rem;
}
.tt-tabs .nav-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.tt-tabs .nav-link:hover { color: var(--fg); border-color: rgba(238, 241, 244, 0.3); }
.tt-tabs .nav-link.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(77, 124, 255, 0.16);
}

/* ---------- chart shell ---------- */
.tt-chart-shell {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(11, 13, 17, 0.65);
  backdrop-filter: blur(6px);
  padding: 2rem 1.6rem 1.2rem;
}
.tt-chart-shell__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0 0.5rem 1.4rem;
}
.tt-chart-shell__canvas { position: relative; height: 380px; }
.tt-chart-shell__canvas canvas { width: 100% !important; }

/* ---------- shared footer ---------- */
.tt-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 4.5rem 8vw 2.5rem;
  background: rgba(6, 7, 9, 0.85);
}
.tt-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.tt-footer__brand .brand { font-size: 1.1rem; }
.tt-footer__tag { margin-top: 1rem; max-width: 20rem; color: var(--fg-dim); font-size: 0.9rem; line-height: 1.7; }
.tt-footer h5 {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 1.2rem;
}
.tt-footer__col ul { list-style: none; }
.tt-footer__col li { margin-bottom: 0.7rem; }
.tt-footer__col a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  transition: color 0.25s;
}
.tt-footer__col a:hover { color: var(--accent); }
.tt-footer__social { display: flex; gap: 1rem; }
.tt-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.25s, transform 0.25s;
}
.tt-footer__social a:hover { border-color: var(--accent); transform: translateY(-3px); }
.tt-footer__social img { width: 16px; height: 16px; }
.tt-footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tt-header { padding: 1.1rem 1.4rem; }
  .tt-nav, .tt-header__auth .btn--ghost { display: none; }
  .tt-burger { display: flex; }
  .section { padding: 8vh 6vw; }
  .section--page-top { padding-top: 18vh; }
  .tt-footer { padding: 3.5rem 6vw 2rem; }
  .tt-footer__grid { flex-direction: column; gap: 2.2rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .line__inner { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .tt-menu { transition: none; }
  * { scroll-behavior: auto !important; }
}
