/* ===========================================================
   TBA Tech — design system
   Black + Orange editorial, alternating dark/light sections
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* core palette */
  --black: #0A0A0A;
  --ink: #141414;
  --ink-2: #1C1C1C;
  --ink-3: #262626;
  --line-dark: #2A2A2A;

  --cream: #F6F2EA;
  --paper: #FAF8F3;
  --white: #FFFFFF;
  --line-light: #E6E1D6;
  --line-light-2: #D9D3C5;

  --orange: #FF5A1F;
  --orange-deep: #E84A12;
  --orange-soft: #FF8754;
  --orange-tint: #FFE2D2;
  --orange-glow: rgba(255,90,31,0.18);

  --text-dim-dark: #8A8A8A;
  --text-dim-light: #6B6B66;

  /* type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* container */
  --maxw: 1280px;
  --pad-x: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ----- container ----- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ----- typography ----- */
.display, h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.no-line::before { display: none; }

.h-hero { font-size: clamp(44px, 6.4vw, 92px); letter-spacing: -0.035em; line-height: 0.98; }
.h-1   { font-size: clamp(36px, 4.5vw, 64px); letter-spacing: -0.03em; }
.h-2   { font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -0.025em; }
.h-3   { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.015em; }

.lead { font-size: clamp(16px, 1.2vw, 19px); color: var(--text-dim-light); max-width: 56ch; }
.dark .lead, .section--dark .lead { color: #B6B6B0; }

/* ----- buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--orange);
  color: var(--white);
}
.btn--primary:hover { background: var(--orange-deep); }
.btn--ghost-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.25);
}
.btn--ghost-dark:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }
.btn--ghost-light {
  background: transparent;
  color: var(--black);
  border-color: rgba(10,10,10,0.2);
}
.btn--ghost-light:hover { border-color: var(--black); background: rgba(10,10,10,0.04); }
.btn--black {
  background: var(--black);
  color: var(--white);
}
.btn--black:hover { background: var(--ink-2); }
.btn--white {
  background: var(--white);
  color: var(--black);
}
.btn--white:hover { background: #f0eee7; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ----- header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}
.site-header.transparent {
  background: transparent;
  border-bottom-color: transparent;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}
.brand-logo--full { height: 56px; }
@media (max-width: 600px) {
  .brand-logo { height: 26px; }
  .brand-logo--full { height: 48px; }
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  transition: color .15s ease;
  position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }
.nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--orange);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .btn { padding: 10px 18px; font-size: 14px; }

.mobile-toggle { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-actions .btn--ghost-dark { display: none; }
  .mobile-toggle {
    display: inline-flex;
    width: 40px; height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
  }
  .mobile-toggle:hover,
  .mobile-toggle[aria-expanded="true"] {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.4);
  }

  /* menu aberto */
  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--black);
    border-bottom: 1px solid var(--line-dark);
    padding: 0 var(--pad-x);
    gap: 0;
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.8);
    z-index: 99;
  }
  .nav.is-open a {
    padding: 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid var(--line-dark);
    width: 100%;
  }
  .nav.is-open a:last-child {
    border-bottom: none;
    padding-bottom: 20px;
  }
  .nav.is-open a:hover { color: var(--white); }
  .nav.is-open a[aria-current="page"] {
    color: var(--orange);
  }
  .nav.is-open a[aria-current="page"]::after { display: none; }
}

/* ----- sections ----- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--ink  { background: var(--ink); color: var(--white); }
.section--paper { background: var(--paper); color: var(--black); }
.section--cream { background: var(--cream); color: var(--black); }
.section--orange { background: var(--orange); color: var(--white); }

.section__head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 56px;
}
.section__head .lead { margin-top: 16px; }
@media (max-width: 800px) {
  .section__head { grid-template-columns: 1fr; gap: 20px; }
}

/* ----- meta strip / link rows ----- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--orange);
  font-size: 15px;
}
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow .arrow { transition: transform .2s ease; }

/* ----- photo placeholder ----- */
.photo {
  position: relative;
  background: linear-gradient(135deg, var(--ink-2), var(--ink-3));
  border-radius: var(--r-lg);
  overflow: hidden;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border: 1px solid var(--line-dark);
}
.photo--light {
  background: linear-gradient(135deg, #ECE7DC, #DDD6C4);
  color: var(--text-dim-light);
  border-color: var(--line-light-2);
}
.photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px circle at 20% 0%, rgba(255,90,31,0.10), transparent 50%),
    radial-gradient(600px circle at 100% 100%, rgba(255,90,31,0.06), transparent 50%);
  pointer-events: none;
}
.photo--light::before {
  background:
    radial-gradient(800px circle at 20% 0%, rgba(255,90,31,0.08), transparent 50%);
}
.photo__label {
  position: relative;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.9;
}
.photo__label .ico {
  width: 36px; height: 36px;
  margin: 0 auto;
  border: 1px dashed currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0.65;
}
.photo__label .ico svg { width: 18px; height: 18px; }
.photo__label small {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
  font-size: 12.5px;
}

/* ----- footer ----- */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 88px 0 32px;
  border-top: 1px solid var(--line-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 56px;
  margin-bottom: 64px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
}
.footer-col p { color: #A8A8A2; font-size: 14.5px; max-width: 36ch; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a {
  font-size: 14.5px;
  color: rgba(255,255,255,0.78);
  transition: color .15s ease;
}
.footer-col ul a:hover { color: var(--orange); }
.footer-newsletter input {
  width: 100%;
  padding: 13px 16px;
  background: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}
.footer-newsletter input::placeholder { color: #6B6B66; }
.footer-newsletter .btn { width: 100%; justify-content: center; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
  color: #6B6B66;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a:hover { color: var(--white); }
.social { display: flex; gap: 14px; margin-top: 18px; }
.social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark);
  color: rgba(255,255,255,0.7);
  transition: all .15s ease;
}
.social a:hover { background: var(--orange); color: var(--white); border-color: var(--orange); }
.social svg { width: 16px; height: 16px; }

/* ----- pill / badge ----- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,90,31,0.12);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.pill--dark { background: var(--ink); color: rgba(255,255,255,0.8); }
.pill--orange-solid { background: var(--orange); color: var(--white); }
.pill--outline-light { background: transparent; color: var(--black); border: 1px solid var(--line-light-2); }

/* ----- card ----- */
.card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-light-2);
  box-shadow: 0 18px 40px -20px rgba(10,10,10,0.18);
}
.card--dark {
  background: var(--ink);
  border-color: var(--line-dark);
  color: var(--white);
}
.card--dark:hover { border-color: var(--orange); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.6); }

/* ----- utilities ----- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

.divider {
  height: 1px;
  background: var(--line-dark);
  margin: 0;
}
.divider--light { background: var(--line-light); }

.mono { font-family: var(--font-mono); }

/* fine grid background for AI subtle aesthetic */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.grid-bg--light {
  background-image:
    linear-gradient(to right, rgba(10,10,10,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* tiny noise overlay for warmth (used sparingly) */
.noise {
  position: relative;
}
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
