/* styles.css - all the styling for the box-d consulting site. */

/* ---------- Brand colours and fonts, defined once and reused ---------- */
:root {
  --navy: #0A1626;        /* main dark background */
  --panel: #10213A;       /* secondary dark panels */
  --light: #F4F7FA;       /* light section background */
  --blue: #00A3FF;        /* accent, from the logo */
  --text-on-dark: #F2F6FA;
  --text-on-light: #0A1626;
  --muted-on-dark: #A9B8CA;
  --line-on-dark: rgba(242, 246, 250, 0.12);

  --font-heading: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --radius: 14px;
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
  /* Stop the sticky header covering section headings when you click a nav link */
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); max-width: 22ch; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

a { color: inherit; }

/* Centres content and keeps a gutter on small screens */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons (rounded) ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--blue); color: var(--navy); }
.btn-primary:hover { background: var(--text-on-dark); }
.btn-outline { border-color: var(--line-on-dark); color: var(--text-on-dark); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-dark { background: var(--navy); color: var(--text-on-dark); }
.btn-dark:hover { background: var(--panel); }
.btn-dark:disabled { opacity: 0.6; cursor: wait; }
.btn-small { padding: 9px 20px; font-size: 0.95rem; }

.btn:focus-visible,
.site-nav a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  border-bottom: 1px solid var(--line-on-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;            /* lets the nav drop below the logo on small screens */
  gap: 12px 32px;
  min-height: var(--header-height);
  padding-top: 10px;
  padding-bottom: 10px;
}
.header-logo img { height: 52px; width: auto; }
.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;            /* links wrap onto a new line instead of overflowing */
  gap: 8px 28px;
}
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  color: var(--muted-on-dark);
}
.site-nav a:not(.btn):hover { color: var(--text-on-dark); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-light { background: var(--light); color: var(--text-on-light); }
.section-panel { background: var(--panel); }

/* Small label above each heading */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.1em;
}
.section-light .eyebrow { color: #0072B5; } /* darker blue so it stays readable on light */

.lead { font-size: 1.15rem; color: var(--muted-on-dark); max-width: 60ch; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 120px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 64px;
}
.hero h1 { max-width: 16ch; }
.hero .lead { margin-bottom: 2em; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: 100%; max-width: 340px; height: auto; }

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.card {
  background: #FFFFFF;
  border: 1px solid #DDE5EE;
  border-radius: var(--radius);
  padding: 36px;
}
.card p { margin: 0; color: #3A4A5E; }
.card-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--blue);
  margin-bottom: 18px;
}
.section-light .card-number { color: #0072B5; }
.card .card-number { font-size: 2.25rem; line-height: 1; margin-bottom: 20px; } /* larger numbers on the Services cards only */

/* ---------- Approach: three columns ---------- */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}
.col {
  border-top: 2px solid var(--blue);
  padding-top: 24px;
}
.col p { color: var(--muted-on-dark); margin: 0; }

/* ---------- AI adoption steps ---------- */
.steps {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--navy);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: 32px;
}
.step p { color: var(--muted-on-dark); margin: 0; }

/* ---------- About ---------- */
.about h2 { max-width: none; }
.placeholder {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px dashed var(--muted-on-dark);
  border-radius: 8px;
  color: var(--muted-on-dark);
  font-size: 0.95rem;
}

/* ---------- Contact panel (blue) ---------- */
#contact { padding-top: 0; }
.contact-panel {
  background: var(--blue);
  color: var(--text-on-light);
  border-radius: 24px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
}
.contact-intro h2 { max-width: 14ch; }
.contact-intro p { font-size: 1.1rem; }
.contact-details { list-style: none; padding: 0; margin: 32px 0 0; font-weight: 500; }
.contact-details li { margin-bottom: 6px; }

.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.optional { font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(10, 22, 38, 0.25);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--text-on-light);
  font-family: var(--font-body);
  font-size: 1rem;
}
.field textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }

.form-status { margin: 0; font-weight: 700; min-height: 1.6em; }
.form-status.is-success,
.form-status.is-error {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--navy);
}
.form-status.is-success { color: var(--text-on-dark); }
.form-status.is-error { color: #FFB4B4; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-on-dark);
  padding: 32px 0;
  font-size: 0.95rem;
  color: var(--muted-on-dark);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-inner p { margin: 0; }

/* ---------- Responsive: stack columns on smaller screens ---------- */
@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .hero-grid,
  .contact-panel { grid-template-columns: 1fr; }
  .hero-logo { order: -1; justify-content: flex-start; }
  .hero-logo img { max-width: 160px; }
  .three-col,
  .steps { grid-template-columns: 1fr; }
  .contact-panel { padding: 40px 28px; gap: 32px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 72px; }
  .card-grid { grid-template-columns: 1fr; }
  .card, .step { padding: 28px; }
  .header-logo img { height: 44px; }
  .site-nav { gap: 6px 18px; }
}
