/* ==========================================================================
   NMS — Network Management Systems
   Main stylesheet (fonts are in fonts.css)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --accent: #111213;          /* eyebrows, step lines, icons, roles */
  --ink: #0B0C0D;             /* main text */
  --black: #07090B;           /* dark sections, buttons */
  --black-2: #101417;         /* dark cards */
  --page: #F5F5F4;            /* page background */
  --white: #FFFFFF;
  --line: #E4E4E2;            /* light borders */
  --line-2: #D6D6D3;          /* pill / chip borders */
  --line-3: #C9C9C5;          /* round button borders */
  --line-dark: #1D2328;       /* borders on dark */
  --line-dark-2: #3B444C;     /* outline buttons on dark */
  --text-muted: #4D5257;      /* body copy on light */
  --text-label: #5E6368;      /* small uppercase labels */
  --text-on-dark: #B5BBC0;    /* body copy on dark */
  --text-nav: #D3D7DA;
  --text-dim: #A2A9AF;
  --tag-bg: #EFEFED;
  --img-bg: #ECECEA;

  --font-sans: Inter, system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max-width: 1240px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.55;
}

a { color: var(--accent); }
section { scroll-margin-top: 16px; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.btn-light   { background: var(--white); color: var(--black); }
.btn-outline { border: 1px solid var(--line-dark-2); color: var(--white); }
.btn-sm      { min-height: 46px; padding: 0 20px; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--black);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}
.brand img { height: 38px; width: auto; display: block; }
.brand-divider { width: 1px; height: 28px; background: var(--line-dark-2); }
.brand-text {
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}
.main-nav a {
  color: var(--text-nav);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
}
.main-nav a.nav-cta {
  color: var(--black);
  background: var(--white);
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 8px;
}

/* Hamburger (shown on small screens only) */
.menu-btn {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line-dark-2);
  background: transparent;
  color: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open  { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  border-top: 1px solid var(--line-dark);
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  animation: fade-down 0.3s var(--ease-out) both;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  color: var(--white);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-dark);
}
.mobile-menu a.mobile-cta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 88px 32px 96px;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
}
.hero-text { flex: 1 1 520px; min-width: 0; }

.eyebrow-dot {
  margin: 0 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.28);
}
.hero-lead {
  margin: 28px 0 0;
  font-size: 19px;
  color: var(--text-on-dark);
  max-width: 560px;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Decorative rack */
.rack-wrap { flex: 1 1 380px; max-width: 460px; min-width: 0; }
.rack {
  background: var(--black-2);
  border: 1px solid #262D33;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rack-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-serif);
  font-size: 13px;
  color: #858C92;
  padding: 0 4px 6px;
}
.rack-status { color: var(--white); }
.rack-unit {
  background: var(--black);
  border: 1px solid #22292F;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.rack-label {
  font-family: var(--font-serif);
  font-size: 11px;
  color: #767D83;
  width: 54px;
}
.ports { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.port {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #2A3036;            /* idle */
}
.port.is-up    { background: var(--white); }
.port.is-alert { background: #8A939B; }

/* ---------- Brands / tech strip ---------- */
.strip {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 28px 32px;
}
.strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.strip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.strip-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  min-width: 150px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.brand-pill {
  height: 38px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-pill img { width: auto; display: block; }   /* height set per logo in HTML */

.tech-btn {
  height: 38px;
  box-sizing: border-box;
  padding: 0 14px 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tech-btn svg { transition: transform 0.25s; }
.tech-btn[aria-expanded="true"] {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.tech-btn[aria-expanded="true"] svg { transform: rotate(45deg); }

.tech-panel {
  margin-top: 8px;
  background: var(--black);
  color: var(--white);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  position: relative;
}
.tech-panel[hidden] { display: none; }

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-dark-2);
  background: transparent;
  color: var(--text-nav);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tech-intro { flex: 1 1 300px; min-width: 0; max-width: 420px; }
.tech-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tech-name {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.tech-desc { margin: 0 0 24px; color: var(--text-on-dark); font-size: 16px; }

.tech-points {
  flex: 2 1 420px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}
.tech-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--black-2);
  border: 1px solid #22292F;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  color: #ECEEF0;
}
.tech-points li svg { flex: 0 0 20px; margin-top: 1px; }

/* ---------- Sections ---------- */
.section { padding: 104px 32px; }
.section-white { background: var(--white); border-top: 1px solid var(--line); }
.section-bordered { border-bottom: 1px solid var(--line); }
.section-dark { background: var(--black); color: var(--white); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}
.section-head-text { max-width: 640px; }
.section-head-wide { max-width: 680px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-light { color: var(--white); }

.section-title {
  margin: 0;
  max-width: 720px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.title-gap-sm { margin-bottom: 16px; }
.title-gap-md { margin-bottom: 20px; }
.title-gap-lg { margin-bottom: 56px; }

.section-aside {
  margin: 0;
  max-width: 380px;
  color: var(--text-muted);
  font-size: 17px;
}
.section-aside-wide { max-width: 440px; }

.section-intro {
  margin: 0 0 48px;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 17px;
}

/* ---------- Services ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.service-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}
.service-card p { margin: 0; color: var(--text-muted); font-size: 16px; }

.cta-banner {
  margin-top: 20px;
  background: var(--black);
  color: var(--white);
  border-radius: 16px;
  padding: 32px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-text { max-width: 720px; }
.cta-text h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.25;
}
.cta-text p { margin: 0; color: var(--text-on-dark); font-size: 16px; }

/* ---------- Process ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}
.steps li { border-top: 3px solid var(--accent); padding-top: 24px; }
.step-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 40px;
  color: var(--line-3);
}
.steps h3 {
  margin: 8px 0 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 21px;
}
.steps p { margin: 0; color: var(--text-muted); }

/* ---------- Projects ---------- */
.project {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 36px);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.project-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.project-meta { display: flex; flex-direction: column; gap: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: #111213;
  font-size: 13px;
  font-weight: 600;
}
.project-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.project-link { font-size: 15px; font-weight: 600; color: var(--accent); }

.round-btn {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--ink);
  transition: background 0.25s, color 0.25s;
}
.round-btn svg { transition: transform 0.3s; }
.project-toggle[aria-expanded="true"] .round-btn { background: var(--black); color: var(--white); }
.project-toggle[aria-expanded="true"] .round-btn svg { transform: rotate(180deg); }

/* Thumbnails: shown while the project is closed */
.thumbs { display: grid; gap: 10px; }
.thumbs-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.thumbs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thumbs img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--img-bg);
}
.project-toggle[aria-expanded="true"] .thumbs { display: none; }

.project-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.project-details[hidden] { display: none; }

.project-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
}
.project-desc { margin: 0; max-width: 640px; color: var(--text-muted); font-size: 16px; }
.project-credit { margin: 0; max-width: 340px; font-size: 14px; color: var(--text-label); }
.project-credit strong { font-weight: 600; color: var(--ink); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: var(--img-bg);
}
.gallery-tall img { height: 420px; }
.gallery figcaption { font-size: 14px; color: var(--text-muted); }

/* ---------- About / profiles ---------- */
.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 20px;
  align-items: start;
}
.profile {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile h3 { margin: 0; }

.profile-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 14px;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
}
.profile-id {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
}
.profile-role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.chevron-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chevron-btn svg { transition: transform 0.2s; }
.profile-toggle[aria-expanded="true"] .chevron-btn svg { transform: rotate(180deg); }

.profile-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-top: 1px solid var(--line-2);
  padding-top: 24px;
}
.profile-body[hidden] { display: none; }
.profile-body > p { margin: 0; color: var(--text-muted); font-size: 16px; }
.profile-body h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}
.timeline li { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.timeline .when { width: 150px; color: var(--text-label); }
.timeline .what { flex: 1 1 220px; }
.timeline strong { font-weight: 600; }

.bullets {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  color: #3B3F43;
}

/* ---------- Contact ---------- */
.contact-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}
.contact-info { flex: 1 1 400px; min-width: 0; }
.contact-lead {
  margin: 0 0 40px;
  color: var(--text-on-dark);
  font-size: 17px;
  max-width: 460px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 16px;
}
.contact-item { display: flex; align-items: center; gap: 14px; }
.contact-item > svg { flex: 0 0 22px; color: var(--white); }
.contact-item strong { font-weight: 600; }
.muted-light { color: var(--text-dim); }

.phones { display: flex; flex-direction: column; gap: 10px; }
.phones-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.phone {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  min-width: 170px;
}
.whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-dark-2);
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

/* Form */
.contact-form {
  flex: 1 1 440px;
  min-width: 0;
  background: var(--black-2);
  border: 1px solid #262D33;
  border-radius: 16px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row { display: flex; flex-wrap: wrap; gap: 20px; }
.form-row .field { flex: 1 1 200px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text-nav); }
.field input,
.field select,
.field textarea {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-dark-2);
  background: var(--black);
  color: var(--white);
  font: inherit;
}
.field textarea { padding: 12px 14px; resize: vertical; }

.submit-btn {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #030405;
  color: #8F969C;
  padding: 64px 32px 28px;
  font-size: 14px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.footer-inner img { width: min(320px, 80%); height: auto; display: block; }
.footer-bottom {
  width: 100%;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Animations ---------- */
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

/* Elements animate in each time they become visible */
.animate-in { animation: fade-down 0.45s var(--ease-out) both; }

/* Children appear one after another */
.stagger > * { animation: fade-down 0.5s var(--ease-out) both; }
.stagger > :nth-child(1) { animation-delay: 0.10s; }
.stagger > :nth-child(2) { animation-delay: 0.18s; }
.stagger > :nth-child(3) { animation-delay: 0.26s; }
.stagger > :nth-child(4) { animation-delay: 0.34s; }
.stagger > :nth-child(5) { animation-delay: 0.42s; }

/* Tech panel list items have a slightly shorter stagger */
.tech-points.stagger > * { animation-duration: 0.45s; }
.tech-points.stagger > :nth-child(1) { animation-delay: 0.08s; }
.tech-points.stagger > :nth-child(2) { animation-delay: 0.15s; }
.tech-points.stagger > :nth-child(3) { animation-delay: 0.22s; }
.tech-points.stagger > :nth-child(4) { animation-delay: 0.29s; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .main-nav { display: none; }
  .menu-btn { display: flex; }
  .header-inner { padding: 14px 20px; }
  .hero { padding: 56px 20px 64px; }
  .section { padding: 64px 20px; }
  .strip, .site-footer { padding: 20px; }
  .strip-label { min-width: 0; width: 100%; }
  .contact-form { padding: 22px; }
  .tech-panel { padding: 24px 20px; }
  .tech-points { padding-right: 0; }
}

/* Hide the mobile menu if the window is widened while it's open */
@media (min-width: 761px) {
  .mobile-menu { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-in,
  .stagger > *,
  .mobile-menu { animation: none !important; }
}

/* ---------- Hover glow ----------
   Buttons glow when hovered, with a soft spotlight that follows the mouse.
   js/app.js updates --x / --y as the mouse moves. */
.btn, .nav-cta, .mobile-cta, .submit-btn,
.tech-btn, .whatsapp, .menu-btn, .close-btn {
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease,
              background 0.2s, color 0.2s;
}
.btn, .nav-cta, .mobile-cta, .submit-btn,
.tech-btn, .whatsapp, .menu-btn { position: relative; }   /* .close-btn is already positioned */

/* The spotlight layer */
.btn::after, .nav-cta::after, .mobile-cta::after, .submit-btn::after,
.tech-btn::after, .whatsapp::after, .menu-btn::after, .close-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(110px circle at var(--x, 50%) var(--y, 50%), var(--glow-spot), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* Glow colours per button type */
.btn-light, .nav-cta, .mobile-cta, .submit-btn {          /* white buttons on dark */
  --glow-spot: rgba(7, 9, 11, 0.12);
  --glow-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 28px rgba(255, 255, 255, 0.35);
}
.btn-outline, .whatsapp, .menu-btn, .close-btn {           /* outline buttons on dark */
  --glow-spot: rgba(255, 255, 255, 0.18);
  --glow-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
}
.tech-btn {                                                /* pill buttons on white */
  --glow-spot: rgba(17, 18, 19, 0.08);
  --glow-shadow: 0 0 0 3px rgba(17, 18, 19, 0.06), 0 6px 20px rgba(17, 18, 19, 0.14);
}
.tech-btn[aria-expanded="true"] { --glow-spot: rgba(255, 255, 255, 0.18); }

@media (hover: hover) {
  .btn:hover, .nav-cta:hover, .mobile-cta:hover, .submit-btn:hover,
  .tech-btn:hover, .whatsapp:hover, .menu-btn:hover, .close-btn:hover {
    box-shadow: var(--glow-shadow);
  }
  .btn:hover::after, .nav-cta:hover::after, .mobile-cta:hover::after, .submit-btn:hover::after,
  .tech-btn:hover::after, .whatsapp:hover::after, .menu-btn:hover::after, .close-btn:hover::after {
    opacity: 1;
  }
  .btn:hover, .nav-cta:hover, .submit-btn:hover, .tech-btn:hover, .whatsapp:hover {
    transform: translateY(-1px);
  }
  .btn-outline:hover, .whatsapp:hover, .menu-btn:hover, .close-btn:hover {
    border-color: rgba(255, 255, 255, 0.55);
  }

  /* The round arrow on projects and profiles glows when the card header is hovered */
  .round-btn, .chevron-btn { transition: box-shadow 0.25s ease, background 0.25s, color 0.25s; }
  .project-toggle:hover .round-btn,
  .profile-toggle:hover .chevron-btn {
    box-shadow: 0 0 0 3px rgba(17, 18, 19, 0.06), 0 6px 20px rgba(17, 18, 19, 0.16);
  }
}

/* Keyboard users get the same glow */
.btn:focus-visible, .nav-cta:focus-visible, .mobile-cta:focus-visible, .submit-btn:focus-visible,
.tech-btn:focus-visible, .whatsapp:focus-visible, .menu-btn:focus-visible, .close-btn:focus-visible {
  outline: none;
  box-shadow: var(--glow-shadow);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .nav-cta:hover, .submit-btn:hover, .tech-btn:hover, .whatsapp:hover { transform: none; }
}

/* ---------- Contact form: service tick boxes ---------- */
.service-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.service-field legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-nav);
}
.field-hint { font-weight: 400; color: var(--text-dim); }

/* Even grid: two columns on wide forms, one on phones */
.service-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 8px;
}

.service-option { position: relative; cursor: pointer; display: block; }
.service-option input {               /* hide the real box but keep it usable by keyboard */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.service-option span {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #262D33;
  border-radius: 8px;
  background: var(--black);
  color: var(--text-nav);
  font-size: 14px;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.service-option span::before {        /* the square tick box */
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid #4A535B;
  border-radius: 4px;
  box-sizing: border-box;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-color 0.15s, border-color 0.15s;
}
.service-option:hover span { border-color: #4A535B; background: #0D1114; }

.service-option input:checked + span {
  border-color: rgba(255, 255, 255, 0.7);
  background: #161B1F;
  color: var(--white);
}
.service-option input:checked + span::before {
  border-color: var(--white);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307090B' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-size: 11px;
}
.service-option input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
.service-field[aria-invalid="true"] .service-option span { border-color: #E5484D; }

/* ---------- Contact form: sending states ---------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #E5484D; }

.submit-btn:disabled { opacity: 0.6; cursor: wait; }

.form-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
}
.form-status.is-success { background: rgba(48, 164, 108, 0.15); color: #7EE2A8; }
.form-status.is-error   { background: rgba(229, 72, 77, 0.15);  color: #FF9592; }