/* ==========================================================================
   Collabrix Development - Main Stylesheet
   Mobile-first, no frameworks. Structure:
   1. Design tokens (CSS variables)
   2. Reset & base
   3. Layout helpers
   4. Buttons
   5. Header / navigation
   6. Hero
   7. Sections, cards, grids
   8. Process / steps
   9. Services detail
   10. About
   11. Contact & forms
   12. CTA band
   13. Footer
   14. Animations
   15. Media queries (tablet, desktop)
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  --blue-900: #0b1f3a;
  --blue-800: #10305a;
  --blue-700: #17458a;
  --blue-600: #1d5bb8;
  --blue-100: #e6eefb;
  --blue-50: #f3f7fd;
  --accent: #f59e0b;        /* single accent: warm amber */
  --accent-dark: #d97f00;
  --white: #ffffff;
  --gray-50: #f6f8fb;
  --gray-100: #eef1f6;
  --gray-200: #dde3ec;
  --gray-500: #5b6678;
  --gray-700: #343e4f;
  --gray-900: #141b28;
  --success: #166534;
  --error: #b42318;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(11, 31, 58, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 18px 44px rgba(11, 31, 58, 0.16);
  --max: 1160px;
  --header-h: 68px;
}

/* 2. Reset & base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-800); }
h1, h2, h3, h4 { color: var(--blue-900); line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }

/* Visible keyboard focus (WCAG 2.4.7) */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Skip link (WCAG 2.4.1) */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--blue-900); color: var(--white); padding: 10px 16px; border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* 3. Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--gray { background: var(--gray-50); }
.section--blue { background: var(--blue-900); color: #d5e0f2; }
.section--blue h2, .section--blue h3 { color: var(--white); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--gray-500); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue-600); margin-bottom: 10px;
}
.section--blue .eyebrow { color: var(--accent); }
.grid { display: grid; gap: 22px; }

/* 4. Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 650; font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--primary { background: var(--accent); color: var(--blue-900); }
.btn--primary:hover { background: var(--accent-dark); color: var(--blue-900); }
.btn--outline { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--blue-900); }
.btn--blue { background: var(--blue-700); color: var(--white); }
.btn--blue:hover { background: var(--blue-800); color: var(--white); }
.btn--block { width: 100%; }

/* 5. Header / navigation ------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.25s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--blue-900); text-decoration: none; }
.logo:hover { color: var(--blue-900); }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo span em { font-style: normal; color: var(--blue-600); font-weight: 600; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px; background: transparent; border: 1px solid var(--gray-200);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--blue-900); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--white);
  border-bottom: 1px solid var(--gray-200); padding: 12px 20px 22px;
  display: none; flex-direction: column; gap: 4px; box-shadow: var(--shadow-md);
}
.nav-menu.is-open { display: flex; }
.nav-menu a.nav-link {
  display: block; padding: 12px 8px; text-decoration: none; color: var(--gray-700); font-weight: 600;
  border-radius: 8px; transition: background 0.2s, color 0.2s;
}
.nav-menu a.nav-link:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-menu a.nav-link[aria-current="page"] { color: var(--blue-700); background: var(--blue-100); }
.nav-menu .btn { margin-top: 10px; }

/* 6. Hero ---------------------------------------------------------------- */
.hero {
  position: relative; color: #dbe6f7; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 31, 58, 0.94) 0%, rgba(16, 48, 90, 0.86) 100%),
    url("https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1600&q=70") center/cover no-repeat;
  padding: 72px 0 80px;
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; max-width: 56ch; color: #c9d7ee; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; font-size: 0.95rem; color: #b7c8e4; }
.hero-badges li::before { content: "\2713"; color: var(--accent); font-weight: 800; margin-right: 8px; }

.page-hero { padding: 56px 0 60px; }
.page-hero h1 { max-width: 22ch; }

/* 7. Sections, cards, grids --------------------------------------------- */
.benefits { grid-template-columns: 1fr; }
.benefit {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 28px; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-100); }
.icon-box {
  width: 52px; height: 52px; border-radius: 12px; background: var(--blue-100); color: var(--blue-700);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon-box svg { width: 26px; height: 26px; }
.benefit p, .card p { color: var(--gray-500); margin-bottom: 0; }

.cards { grid-template-columns: 1fr; }
.card {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.5s; }
.card:hover img { transform: scale(1.04); }
.card-media { overflow: hidden; }
.card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card-body .more { margin-top: auto; padding-top: 16px; font-weight: 650; text-decoration: none; }
.card-body .more::after { content: " \2192"; transition: margin 0.2s; }
.card-body .more:hover::after { margin-left: 4px; }

/* 8. Process / steps ----------------------------------------------------- */
.steps { grid-template-columns: 1fr; counter-reset: step; }
.step { position: relative; padding: 26px 24px 24px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--blue-900);
  font-weight: 800; margin-bottom: 14px;
}
.step p { margin: 0; color: #b9c9e3; }

.stats { grid-template-columns: repeat(2, 1fr); text-align: center; }
.stat strong { display: block; font-size: 2rem; color: var(--blue-700); font-weight: 800; line-height: 1.1; }
.stat span { color: var(--gray-500); font-size: 0.95rem; }

/* 9. Services detail ----------------------------------------------------- */
.service-detail { display: grid; gap: 28px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--gray-200); }
.service-detail:last-of-type { border-bottom: 0; }
.service-detail img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.service-detail h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.check-list { margin: 16px 0 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: "\2713"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue-100); color: var(--blue-700); font-size: 0.75rem; font-weight: 800;
  display: grid; place-items: center;
}
.outcome-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.sub-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.sub-nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #dbe6f7; font-size: 0.9rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.2); transition: background 0.2s; }
.sub-nav a:hover { background: var(--accent); color: var(--blue-900); }

/* 10. About -------------------------------------------------------------- */
.two-col { display: grid; gap: 32px; align-items: center; }
.two-col img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.values { grid-template-columns: 1fr; }
.value { padding: 26px; border-left: 4px solid var(--accent); background: var(--white); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow-sm); }
.value p { margin: 0; color: var(--gray-500); }
.disclaimer { font-size: 0.88rem; color: var(--gray-500); border-top: 1px solid var(--gray-200); padding-top: 18px; margin-top: 28px; }

/* 11. Contact & forms ---------------------------------------------------- */
.contact-grid { display: grid; gap: 32px; }
.info-card { background: var(--blue-900); color: #d5e0f2; padding: 32px; border-radius: var(--radius-lg); }
.info-card h2, .info-card h3 { color: var(--white); }
.info-card a { color: var(--accent); font-weight: 650; }
.info-card a:hover { color: #ffd27a; }
.info-list { display: grid; gap: 22px; margin-top: 20px; }
.info-list li { display: flex; gap: 14px; }
.info-list svg { width: 24px; height: 24px; flex: none; color: var(--accent); margin-top: 3px; }
.info-list address { font-style: normal; }
.hours { width: 100%; border-collapse: collapse; margin-top: 4px; }
.hours td { padding: 3px 0; }
.hours td:last-child { text-align: right; }

.form-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md); }
.form-row { display: grid; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 650; color: var(--blue-900); margin-bottom: 6px; font-size: 0.95rem; }
.field .req { color: var(--error); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--gray-900); padding: 13px 14px; min-height: 48px;
  border: 1.5px solid var(--gray-200); border-radius: 10px; background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(29, 91, 184, 0.15); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { display: none; color: var(--error); font-size: 0.88rem; margin-top: 6px; }
.field.has-error .field-error { display: block; }
.form-note { font-size: 0.85rem; color: var(--gray-500); margin: 12px 0 0; }
.form-success {
  display: none; background: #ecfdf3; border: 1px solid #abefc6; color: var(--success);
  border-radius: 10px; padding: 18px 20px; margin-bottom: 20px; font-weight: 600;
}
.form-success.is-visible { display: block; animation: fadeUp 0.5s ease both; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.map-wrap { margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow-md); }
.map-wrap iframe { display: block; width: 100%; height: 360px; border: 0; }
.map-caption { padding: 12px 18px; background: var(--gray-50); font-size: 0.88rem; color: var(--gray-500); }

/* 12. CTA band ----------------------------------------------------------- */
.cta-band { background: linear-gradient(120deg, var(--blue-800), var(--blue-600)); color: #e0eafa; text-align: center; padding: 64px 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 58ch; margin: 0 auto 26px; }

/* 13. Footer ------------------------------------------------------------- */
.site-footer { background: var(--blue-900); color: #b7c6df; padding: 56px 0 0; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 34px; padding-bottom: 40px; }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #b7c6df; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .logo { color: var(--white); margin-bottom: 14px; }
.site-footer .logo span em { color: #8fb4ee; }
.footer-links { display: grid; gap: 8px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px 0; font-size: 0.85rem; display: grid; gap: 8px; }
.footer-bottom p { margin: 0; }

/* 14. Animations --------------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.hero .container > * { animation: fadeUp 0.8s ease both; }
.hero .container > *:nth-child(2) { animation-delay: 0.1s; }
.hero .container > *:nth-child(3) { animation-delay: 0.2s; }
.hero .container > *:nth-child(4) { animation-delay: 0.3s; }

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

/* 15. Media queries ------------------------------------------------------ */
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
  .benefits, .cards, .steps, .values { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .section { padding: 92px 0; }
  .hero { padding: 120px 0 130px; }
  .page-hero { padding: 84px 0 88px; }

  .nav-toggle { display: none; }
  .nav-menu {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 4px;
    padding: 0; border: 0; box-shadow: none; background: transparent;
  }
  .nav-menu .btn { margin: 0 0 0 12px; padding: 10px 20px; min-height: 44px; }
  .nav-menu a.nav-link { padding: 8px 14px; }

  .benefits { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .values { grid-template-columns: repeat(3, 1fr); }

  .service-detail { grid-template-columns: 1fr 1fr; gap: 56px; padding: 64px 0; }
  .service-detail:nth-of-type(even) .service-media { order: 2; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 64px; }
  .two-col--reverse .two-col-media { order: 2; }
  .contact-grid { grid-template-columns: 1fr 1.4fr; gap: 44px; align-items: start; }
  .form-card { padding: 40px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; }
  .footer-bottom { grid-template-columns: 1fr auto; }
  .map-wrap iframe { height: 440px; }
}
