/* =========================================================
   Byte-Me IT Services — styles.css
   Corporate layout, logo palette, subtle retro details
   (floppy-disk icons + stepped "pixel" marks).
   ========================================================= */

/* ---------- Self-hosted fonts (SIL OFL; no third-party requests) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  /* Logo palette */
  --ink:        #30393F;
  --ink-2:      #4A545A;
  --muted:      #6B757A;
  --orange:     #D37951;
  --orange-ink: #A9532D;   /* orange for text (WCAG AA on light) */
  --blue:       #467081;
  --blue-lt:    #8DB3C4;
  --tan:        #DCCBB7;
  --label:      #F5F1E8;
  --brown:      #81695C;

  /* Surfaces */
  --bg:         #FBF9F5;
  --cream:      #F0EAE1;
  --surface:    #FFFFFF;
  --line:       #E3DDD2;
  --line-2:     #CFC8BC;

  --f-head: "Montserrat", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(48, 57, 63, .06);
  --shadow-md: 0 1px 2px rgba(48, 57, 63, .05), 0 14px 36px -14px rgba(48, 57, 63, .22);
  --container: 1160px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }

.mono { font-family: var(--f-mono); }
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Retro signature: stepped pixels (8" / 5.25" / 3.5") ---------- */
.pixels { display: inline-flex; align-items: flex-end; gap: 3px; margin-right: 12px; vertical-align: -1px; }
.pixels i { display: block; }
.pixels i:nth-child(1) { width: 9px; height: 9px; background: var(--ink); }
.pixels i:nth-child(2) { width: 7px; height: 7px; background: var(--orange); }
.pixels i:nth-child(3) { width: 5px; height: 5px; background: var(--blue); }
.section-dark .pixels i:nth-child(1) { background: var(--label); }

/* ---------- Floppy-disk icons (scale with --s) ---------- */
.disk { --s: 18px; position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); border: 1.5px solid var(--ink); border-radius: 2px; }
.disk::before, .disk::after { content: ""; position: absolute; }
.disk::before { background: var(--label); border: 1px solid var(--ink); border-radius: 1px; }
.disk-8   { background: var(--ink); }
.disk-8::before   { left: 9%; top: 9%; width: 36%; height: 22%; }
.disk-8::after    { left: 36%; top: 38%; width: 28%; height: 28%; border-radius: 50%; background: var(--label); box-shadow: 0 0 0 calc(var(--s) * .06) var(--tan); }
.disk-525 { background: var(--orange); }
.disk-525::before { left: 22%; right: 12%; top: 8%; height: 20%; }
.disk-525::after  { left: 36%; top: 42%; width: 26%; height: 26%; border-radius: 50%; background: var(--label); box-shadow: 0 0 0 1px var(--ink); }
.disk-35  { background: var(--blue); }
.disk-35::before  { left: 14%; right: 14%; bottom: 8%; height: 38%; }
.disk-35::after   { left: 28%; width: 40%; top: -1px; height: 32%; background: var(--brown); border: 1px solid var(--ink); border-top: 0; }
.disk-lg { --s: 40px; border-width: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--f-body); font-weight: 600; font-size: .975rem;
  padding: .85em 1.5em; border-radius: var(--radius-sm);
  border: 1px solid transparent; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #222A2F; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(48,57,63,.45); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn-sm { padding: .6em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(251, 249, 245, .9);
  backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 63px; height: auto; }
.brand-text { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; line-height: 1; letter-spacing: .05em; color: var(--ink); }
.brand-text small { display: block; font-size: .56rem; letter-spacing: .3em; margin-top: 4px; color: var(--ink-2); }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; }
.site-nav a:not(.btn) { font-size: .95rem; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 6px 0; position: relative; }
.site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.site-nav a:not(.btn):hover, .site-nav a.active { color: var(--ink); }
.site-nav a:not(.btn):hover::after, .site-nav a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius-sm); width: 44px; height: 42px; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; height: 2px; background: var(--ink); margin: 4px 0; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(36px, 6vw, 80px); align-items: center; }

.eyebrow, .section-tag {
  font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.3em; font-family: var(--f-mono);
}
.hl { color: var(--orange-ink); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Panels (hero overview + form) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.hero-panel { padding: 8px 0 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.panel-head p { margin: 0; font-weight: 600; font-size: .95rem; }
.disk-set { display: inline-flex; align-items: flex-end; gap: 4px; }
.disk-set .disk-8 { --s: 20px; } .disk-set .disk-525 { --s: 16px; } .disk-set .disk-35 { --s: 13px; border-width: 1px; }
.disk-set .disk::before { border-width: 0; }

.panel-rows { margin: 0; padding: 4px 24px; }
.panel-rows div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.panel-rows div:last-child { border-bottom: 0; }
.panel-rows dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.panel-rows dd { margin: 0; font-size: .97rem; font-weight: 500; color: var(--ink); line-height: 1.45; }
.panel-chips { list-style: none; margin: 0; padding: 14px 24px 18px; display: flex; flex-wrap: wrap; gap: 8px; background: var(--bg); border-top: 1px solid var(--line); }
.panel-chips li { font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }
.panel-chips li:nth-child(1) { border-color: var(--blue); color: var(--blue); }
.panel-chips li:nth-child(2) { border-color: var(--orange); color: var(--orange-ink); }
.panel-chips li:nth-child(3) { border-color: var(--ink); color: var(--ink); }


/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-alt { background: var(--cream); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 60px); }
.section-sub { font-size: 1.1rem; color: var(--ink-2); }

/* Engagement models */
.engage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: clamp(48px, 6vw, 72px); }
.engage-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.engage-card p:last-child { margin-bottom: 0; color: var(--ink-2); font-size: 1rem; }
.engage-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: .8em; }

/* Principles */
.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.principles li { padding-top: 20px; border-top: 2px solid var(--ink); }
.principles h3 { font-size: 1.05rem; margin-bottom: .45em; }
.principles p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.p-num { display: block; font-size: .8rem; color: var(--blue); margin-bottom: 10px; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  --accent: var(--ink);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius); padding: 32px 28px 26px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-blue { --accent: var(--blue); } .svc-orange { --accent: var(--orange); } .svc-ink { --accent: var(--ink); }
.service-card .disk-lg { margin-bottom: 22px; }
.service-card > .svc-kicker { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .5em; }
.service-card > p { color: var(--ink-2); font-size: 1rem; }
.svc-list { list-style: none; padding: 0; margin: 6px 0 24px; font-size: .95rem; }
.svc-list li { position: relative; padding: 9px 0 9px 22px; border-top: 1px solid var(--line); color: var(--ink); }
.svc-list li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 7px; background: var(--accent); }
.service-card > .svc-fit { margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.svc-fit strong { color: var(--ink); font-weight: 600; margin-right: 4px; }

/* Process */
.section-dark { background: var(--ink); color: #E6E9EA; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-tag { color: var(--blue-lt); }
.section-dark .section-sub { color: #C3CACD; }
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { position: relative; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; }
.step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--orange); }
.step-num { font-size: .85rem; color: var(--orange); margin-bottom: 12px; display: block; }
.step p { color: #C3CACD; font-size: .97rem; }
.step .step-out { margin: auto 0 0; padding-top: 8px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-lt); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.next-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.next-steps li { display: flex; gap: 14px; align-items: baseline; color: var(--ink-2); font-size: 1rem; }
.next-steps span { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--cream); color: var(--ink); font-size: .8rem; transform: translateY(-1px); }
.contact-info { margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-info dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-info dd { margin: 4px 0 0; font-weight: 500; }
.contact-info a { color: var(--ink); font-weight: 600; }

.form-panel { padding: clamp(24px, 3.5vw, 36px); }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: .75em .9em; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input::placeholder, .field textarea::placeholder { color: #9AA2A6; }
.field input:hover, .field textarea:hover { border-color: #B8B0A3; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(70, 112, 129, .18); }
.field.invalid input, .field.invalid textarea { border-color: var(--orange-ink); box-shadow: 0 0 0 3px rgba(211, 121, 81, .18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: -4px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.form-status { margin: 0; font-size: .92rem; font-weight: 500; text-align: center; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--blue); } .form-status.err { color: var(--orange-ink); }

/* Footer */
.site-footer { background: var(--cream); padding: 56px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { margin: 16px 0 0; color: var(--ink-2); max-width: 30em; }
.brand-footer img, .footer-brand img { width: 56px; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-nav p, .footer-contact p { margin: 0 0 4px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.footer-nav a, .footer-contact a { color: var(--ink); text-decoration: none; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--orange-ink); }
.footer-contact span { color: var(--ink-2); }
.footer-bottom { border-top: 1px solid var(--line-2); padding: 20px 0 28px; }
.footer-bottom p { margin: 0; font-size: .85rem; color: var(--muted); }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .services-grid { grid-template-columns: 1fr; max-width: 640px; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}

@media (max-width: 860px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-panel { max-width: 560px; }
  .engage-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; }
  .site-nav li a:not(.btn) { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav li a:not(.btn)::after { display: none; }
  .site-nav li .btn { margin-top: 16px; width: 100%; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .principles, .process { grid-template-columns: 1fr; }
  .field-row, .contact-info { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .panel-rows div { grid-template-columns: 1fr; gap: 2px; }
}

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