/* =========================================================
   ByteBuild — studio stylesheet
   Palette: ink navy / fog paper / amber & teal accents
   Type: Space Grotesk (display) + IBM Plex Sans (body)
   ========================================================= */

:root {
  --ink: #14161f;
  --ink-soft: #1d202c;
  --paper: #eef1f4;
  --paper-raised: #ffffff;
  --line: rgba(20, 22, 31, 0.12);
  --line-dark: rgba(238, 241, 244, 0.14);
  --text: #1c1e27;
  --text-muted: #5b606f;
  --text-on-dark: #eef1f4;
  --text-on-dark-muted: #9aa0b0;
  --amber: #d99a3b;
  --amber-deep: #b97e26;
  --teal: #2c6e63;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--paper);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-head p {
  max-width: 34ch;
  color: var(--text-muted);
}

.on-dark { color: var(--text-on-dark); }
.on-dark .text-muted { color: var(--text-on-dark-muted); }
.text-muted { color: var(--text-muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:hover { background: var(--amber-deep); }

.btn-outline {
  border-color: currentColor;
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.on-dark .btn-outline {
  color: var(--text-on-dark);
}
.on-dark .btn-outline:hover {
  background: var(--text-on-dark);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(238, 241, 244, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}
.logo span { color: var(--amber-deep); }

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover {
  color: var(--ink);
  border-color: var(--amber);
}

.nav-cta { display: flex; align-items: center; gap: 20px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding: 16px 28px 24px;
}
.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.mobile-menu.hidden { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 176px 0 96px;
  overflow: hidden;
  background: var(--paper);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  opacity: 0.7;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: end;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  max-width: 15ch;
}

.hero-lede {
  margin-top: 28px;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  border-left: 1px solid var(--line);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-stat b {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  color: var(--ink);
}
.hero-stat span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .hero { padding: 140px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stats {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 24px;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ---------- Work / Portfolio ---------- */

.work {
  background: var(--paper);
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.work-item {
  background: var(--paper);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.work-item.feature {
  grid-column: span 2;
}

.work-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background: var(--paper-raised);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s ease;
}
.work-item:hover .work-thumb img {
  transform: scale(1.03);
}

.work-body {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.work-body h3 {
  font-size: 1.2rem;
}

.work-body p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 52ch;
}

.work-tools {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 3px;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  border-bottom: 1px solid var(--amber);
  padding-bottom: 1px;
  width: fit-content;
}

@media (max-width: 760px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-item.feature { grid-column: span 1; }
  .work-body { flex-direction: column; }
}

/* ---------- Services ---------- */

.services {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 96px 0;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--line-dark);
  align-items: start;
}
.service-row:last-child {
  border-bottom: 1px solid var(--line-dark);
}

.service-row h3 {
  font-size: 1.35rem;
  color: var(--text-on-dark);
}

.service-copy p {
  color: var(--text-on-dark-muted);
  max-width: 56ch;
}

.service-copy .work-tools {
  color: #6c7385;
  margin-top: 12px;
  display: block;
}

@media (max-width: 760px) {
  .service-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Process ---------- */

.process {
  background: var(--paper);
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-step {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}

.process-step .num {
  font-family: "Space Grotesk", sans-serif;
  color: var(--amber-deep);
  font-size: 0.9rem;
}

.process-step h4 {
  margin-top: 10px;
  font-size: 1.05rem;
}

.process-step p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* ---------- Stack ---------- */

.stack {
  padding: 80px 0;
  background: var(--paper);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack-list span {
  border: 1px solid var(--line);
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: var(--paper-raised);
}

/* ---------- Testimonials ---------- */

.testimonials {
  padding: 96px 0;
  background: var(--ink);
  color: var(--text-on-dark);
}

.testi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.testi-card {
  background: var(--ink);
  padding: 36px;
}

.testi-quote {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 46ch;
}

.testi-person {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.testi-person img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.testi-person b { font-size: 0.92rem; display: block; }
.testi-person span { font-size: 0.85rem; color: var(--text-on-dark-muted); }

@media (max-width: 760px) {
  .testi-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */

.contact {
  padding: 96px 0;
  background: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
}

.contact-detail {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.contact-detail:last-of-type { border-bottom: 1px solid var(--line); }

.contact-detail b {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
}
.contact-detail span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.contact-note {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 42ch;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 8px;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--amber-deep);
  outline: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#form-status {
  margin-top: 14px;
  font-size: 0.88rem;
}
#form-status.hidden { display: none; }
#form-status.ok { color: var(--teal); }
#form-status.err { color: #b8492f; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark-muted);
  padding: 48px 0;
  border-top: 1px solid var(--line-dark);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.88rem;
}

.footer-links a:hover { color: var(--text-on-dark); }

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}

.footer-social {
  display: flex;
  gap: 18px;
}
.footer-social a:hover { color: var(--text-on-dark); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
