/* ============================================================
   TechBor — techbor.uz
   Palette and type are fixed by the brand book:
   navy #0F2D52 · teal #1B8285 · tint #D2E9EC · white
   Display: Space Grotesk · Body: Inter · Utility: IBM Plex Mono
   ============================================================ */

:root {
  --navy: #0F2D52;
  --navy-deep: #0A2140;
  --teal: #1B8285;
  --teal-dark: #146568;      /* small-text-safe teal */
  --tint: #D2E9EC;
  --tint-soft: #EAF4F6;
  --ink: #0F2D52;
  --ink-soft: #3B5570;       /* body copy, 7.7:1 on white */
  --line: #D8E4E8;
  --white: #FFFFFF;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --notch: 22px;             /* card corner cut, echoes the logo angles */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--navy); color: #fff; padding: .5rem 1rem;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 1rem;
}
h2 { font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
.section-sub { margin-top: .75rem; max-width: 34rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: .8rem 1.6rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  /* one clipped corner — the brand notch */
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background-color .18s, color .18s, border-color .18s;
}
.btn-solid { background: var(--teal); color: #fff; }
.btn-solid:hover { background: var(--navy); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.25rem; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.35rem; color: var(--navy);
  letter-spacing: -.01em;
}
.brand-word em { font-style: normal; color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) {
  font-family: var(--font-display); font-weight: 500; font-size: .975rem;
  color: var(--navy); text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--teal-dark); }
.btn-nav { padding: .55rem 1.2rem; font-size: .925rem; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 10px;
  width: 24px; height: 2px; background: var(--navy);
  transition: transform .2s, opacity .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 55%, var(--tint-soft) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  padding-top: clamp(4rem, 10vh, 7.5rem);
  padding-bottom: clamp(4rem, 10vh, 7rem);
  max-width: var(--wrap);
}
.hero-title {
  font-size: clamp(2.5rem, 1.6rem + 5vw, 4.75rem);
  font-weight: 700; letter-spacing: -.02em;
  max-width: 14em;
}
.hero-title .accent { color: var(--teal); }
.hero-sub {
  margin-top: 1.5rem; max-width: 36rem;
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
}
.hero-cta { margin-top: 2.25rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* Chevron field: outlined ">" shapes lifted from the logo geometry */
.hero-field { position: absolute; inset: 0; pointer-events: none; }
.chev {
  position: absolute;
  border-style: solid; border-color: currentColor;
  border-width: 0; border-top-width: 14px; border-right-width: 14px;
  transform: rotate(45deg);
  opacity: .1;
}
.chev-a { color: var(--teal);  width: 340px; height: 340px; right: -60px;  top: 8%;  animation: drift 14s ease-in-out infinite alternate; }
.chev-b { color: var(--navy);  width: 220px; height: 220px; right: 160px;  top: 34%; border-top-width: 10px; border-right-width: 10px; animation: drift 18s ease-in-out infinite alternate-reverse; }
.chev-c { color: var(--teal);  width: 130px; height: 130px; right: 48px;   bottom: 6%; border-top-width: 8px; border-right-width: 8px; opacity: .16; animation: drift 11s ease-in-out infinite alternate; }
.chev-d { color: var(--navy);  width: 90px;  height: 90px;  left: -30px;   bottom: 14%; border-top-width: 7px; border-right-width: 7px; opacity: .07; animation: drift 16s ease-in-out infinite alternate-reverse; }

@keyframes drift {
  from { transform: rotate(45deg) translate(0, 0); }
  to   { transform: rotate(45deg) translate(-26px, 22px); }
}

/* ---------- Registry strip (signature element) ---------- */
.registry { background: var(--navy); color: #fff; }
.registry-inner {
  display: flex; flex-wrap: wrap;
  gap: 1.5rem 3rem;
  padding-top: 1.4rem; padding-bottom: 1.4rem;
}
.reg-item { display: flex; flex-direction: column; gap: .15rem; }
.reg-label {
  font-family: var(--font-mono);
  font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase;
  color: #9FD4D6;
}
.registry .reg-label { color: #9FD4D6; }
.reg-value {
  font-family: var(--font-mono);
  font-size: .9375rem; color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vh, 6.5rem) 0; }
.section-slim { padding: clamp(2.5rem, 6vh, 4rem) 0; }
.section-tint { background: var(--tint-soft); }
.section-head { margin-bottom: 2.75rem; max-width: 46rem; }

/* ---------- Service cards ---------- */
.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.75rem 1.5rem 1.6rem;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  transition: transform .22s ease, border-color .22s ease;
}
.card::before {
  /* teal wedge that fills the notch on hover */
  content: "";
  position: absolute; top: 0; right: 0;
  width: var(--notch); height: var(--notch);
  background: var(--teal);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
  opacity: 0; transition: opacity .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--teal); }
.card:hover::before { opacity: 1; }
.card-tag {
  font-family: var(--font-mono);
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .8rem;
}
.card h3 { margin-bottom: .6rem; }
.card p:last-child { font-size: .975rem; }

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 1.25rem; align-items: start;
  counter-reset: none;
}
.step h3 { margin-bottom: .5rem; }
.step p { font-size: .95rem; }
.step-arrow { display: flex; align-items: center; justify-content: center; padding-top: .35rem; }
.chev-glyph {
  width: 16px; height: 16px; display: block;
  border-top: 3px solid var(--teal);
  border-right: 3px solid var(--teal);
  transform: rotate(45deg);
}

/* ---------- Tech stack ---------- */
.stack-strip {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: .5rem;
}
.stack-strip li {
  font-family: var(--font-mono); font-size: .875rem;
  color: var(--navy);
  border: 1px solid var(--line);
  background: var(--white);
  padding: .35rem .8rem;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: border-color .18s, background-color .18s;
}
.stack-strip li:hover { border-color: var(--teal); background: var(--tint-soft); }

/* ---------- Why ---------- */
.why-grid {
  display: grid; gap: 2.25rem 3rem;
  grid-template-columns: repeat(2, 1fr);
}
.why-item { position: relative; padding-left: 2rem; }
.why-item::before {
  content: "";
  position: absolute; left: 0; top: .45rem;
  width: 11px; height: 11px;
  border-top: 3px solid var(--teal);
  border-right: 3px solid var(--teal);
  transform: rotate(45deg);
}
.why-item h3 { margin-bottom: .4rem; }

/* ---------- About ---------- */
.about-inner .section-head { margin-bottom: 1.5rem; }
.about-body p { max-width: 46rem; font-size: 1.125rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; gap: 3rem;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
}
.contact-block { margin-bottom: 1.6rem; }
.contact-block .reg-label { color: var(--teal-dark); margin-bottom: .3rem; }
.contact-block a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.contact-form .field { margin-bottom: 1.1rem; }
.contact-form label {
  display: block;
  font-family: var(--font-display); font-weight: 500;
  font-size: .95rem; color: var(--navy);
  margin-bottom: .35rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  padding: .7rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: 0;
  background: var(--white);
  transition: border-color .18s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--teal);
}
.contact-form textarea { resize: vertical; }
.form-note { margin-top: .8rem; font-size: .9rem; color: var(--teal-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep); color: #C4D3E3;
  font-size: .9375rem;
}
.footer-inner {
  display: grid; gap: 2.5rem;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr);
  padding-top: 3.25rem; padding-bottom: 2.5rem;
}
.brand-invert .brand-word { color: #fff; }
.brand-invert .brand-word em { color: #5FC1C4; }
.footer-tag { margin-top: .9rem; }
.footer-legal p { margin-bottom: .45rem; }
.footer-legal strong { color: #fff; }
.footer-legal a, .footer-links a { color: #9FD4D6; }
.footer-links { display: flex; flex-direction: column; gap: .6rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 1.25rem; padding-bottom: 1.5rem;
  font-size: .85rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: none; }
/* gentle stagger inside grids */
.card-grid .reveal:nth-child(2), .why-grid .reveal:nth-child(2) { transition-delay: .08s; }
.card-grid .reveal:nth-child(3), .why-grid .reveal:nth-child(3) { transition-delay: .16s; }
.card-grid .reveal:nth-child(4), .why-grid .reveal:nth-child(4) { transition-delay: .24s; }
.card-grid .reveal:nth-child(5) { transition-delay: .32s; }
.card-grid .reveal:nth-child(6) { transition-delay: .4s; }

/* ---------- Utility pages (privacy / terms) ---------- */
.legal-page { padding: 3.5rem 0 5rem; }
.legal-page .wrap { max-width: 760px; }
.legal-page h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: .5rem; }
.legal-page .updated {
  font-family: var(--font-mono); font-size: .8125rem;
  color: var(--teal-dark); margin-bottom: 2.5rem;
}
.legal-page h2 { font-size: 1.35rem; margin: 2.25rem 0 .75rem; }
.legal-page p, .legal-page li { margin-bottom: .8rem; }
.legal-page ul { list-style: disc; padding-left: 1.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .step-arrow { justify-content: flex-start; padding: 0 0 0 .1rem; }
  .chev-glyph { transform: rotate(135deg); }   /* point down when stacked */
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .chev-b { display: none; }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .br-wide { display: none; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    gap: 1.1rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1.25rem;
  }
  .site-nav.open { display: flex; }
  .registry-inner { gap: 1rem 2rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chev { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card::before, .btn, .stack-strip li { transition: none; }
  .card:hover { transform: none; }
}
