/* ==========================================================================
   Handled Digital — shared stylesheet
   Palette taken from the logo: charcoal + teal on white.
   One stylesheet, all four pages. Edit colours/fonts here once.
   ========================================================================== */

:root {
  --charcoal:      #333333;   /* logo "Handled" — body text, headings */
  --charcoal-deep: #1f2a2e;   /* dark section backgrounds (callout boxes) */
  --teal:          #1a8a8a;   /* logo "Digital" — accent, links, buttons */
  --teal-dark:     #146f6f;   /* button hover */
  --teal-tint:     #e8f3f3;   /* very light teal — soft section backgrounds */
  --ink-soft:      #5a6468;   /* secondary text, sub-lines */
  --line:          #e2e5e6;   /* hairline borders */
  --bg:            #ffffff;
  --bg-grey:       #f6f7f7;   /* alternating section background */
  --maxw:          1140px;
  --radius:        14px;
  --shadow:        0 2px 14px rgba(31, 42, 46, 0.06);
}

/* ---- reset / base -------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; color: var(--charcoal); font-weight: 700; }
h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem;   letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

p { color: var(--ink-soft); }

/* ---- layout helpers ------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section      { padding: 80px 0; }
.section--grey { background: var(--bg-grey); }
.section--tint { background: var(--teal-tint); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-tint);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; }

.section > .wrap > h2 { margin-bottom: 14px; }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn--primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

.btn--ghost {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.btn--ghost:hover { background: var(--teal-tint); }

/* ghost button on a dark background */
.btn--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.12); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---- header / nav -------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav__logo img { height: 42px; width: auto; }
.nav__logo { display: flex; align-items: center; }

.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav__links a {
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.97rem;
}
.nav__links a:hover { color: var(--teal); text-decoration: none; }
.nav__links a.is-active { color: var(--teal); font-weight: 600; }

.nav__cta {
  background: var(--teal);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 9px;
  font-weight: 600;
}
.nav__cta:hover { background: var(--teal-dark); text-decoration: none; }

/* mobile nav: simple stacked links under a tap target */
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 1.5rem; color: var(--charcoal); }

@media (max-width: 720px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 63px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 12px 24px; }
  .nav__links .nav__cta { margin: 8px 24px; text-align: center; }
  .nav__toggle { display: block; }
}

/* ---- hero ---------------------------------------------------------------- */
.hero { padding: 76px 0; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero .hero__sub { font-size: 1.12rem; margin-bottom: 18px; }
.hero .hero__punch {
  font-weight: 700;
  color: var(--charcoal);
  font-size: 1.08rem;
}

/* hero image placeholder — gradient fallback if no photo wired in */
.hero__media {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(135deg, var(--charcoal-deep), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 24px;
}
.hero__media .ph-note { font-size: 0.95rem; line-height: 1.5; }

/* hero with a real photo wired in */
.hero__media--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 460px;
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__media { min-height: 280px; order: -1; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
}

/* ---- generic image placeholder (Services "what we don't do" etc.) -------- */
.imgph {
  border-radius: var(--radius);
  min-height: 360px;
  background: var(--bg-grey);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 24px;
}

/* real photo in a content split (Services page) */
.svc-photo {
  border-radius: var(--radius);
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

/* ---- card grids ---------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

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

/* problem card — left teal accent bar */
.pcard {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 22px 24px;
}
.pcard h3 { margin-bottom: 6px; }
.pcard p { font-size: 0.97rem; }

/* feature item — icon + text */
.feature { text-align: left; }
.feature__icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--teal-tint);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature__icon svg { width: 24px; height: 24px; stroke: var(--teal); fill: none; stroke-width: 2; }
.feature h3 { margin-bottom: 6px; }
.feature p { font-size: 0.97rem; }

/* ---- dark callout box ---------------------------------------------------- */
.callout {
  background: var(--charcoal-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 38px;
}
.callout h3 { color: #fff; margin-bottom: 10px; font-size: 1.25rem; }
.callout p { color: rgba(255,255,255,0.82); }

/* split: text one side, callout/other the other */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* ---- services table ------------------------------------------------------ */
.svc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 26px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.svc-table th, .svc-table td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.svc-table thead th {
  background: var(--bg-grey);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.svc-table tbody tr:last-child td { border-bottom: 0; }
.svc-table .svc-name  { font-weight: 700; color: var(--charcoal); white-space: nowrap; }
.svc-table .svc-price { font-weight: 700; color: var(--teal); white-space: nowrap; }
.svc-table .svc-what  { color: var(--ink-soft); font-size: 0.97rem; }

@media (max-width: 680px) {
  /* stack the table into cards on narrow screens */
  .svc-table, .svc-table thead, .svc-table tbody,
  .svc-table th, .svc-table td, .svc-table tr { display: block; }
  .svc-table thead { display: none; }
  .svc-table tr {
    border-bottom: 1px solid var(--line);
    padding: 8px 4px;
  }
  .svc-table td { border: 0; padding: 4px 16px; }
  .svc-table .svc-price { color: var(--teal); }
}

/* ---- contact form -------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-fields .field--full { grid-column: 1 / -1; }
@media (max-width: 540px) { .form-fields { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.field label .req { color: var(--teal); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.97rem;
  color: var(--charcoal);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
.field textarea { resize: vertical; min-height: 92px; }

.form-aside h3 { margin-bottom: 12px; }
.form-aside p { font-size: 0.97rem; margin-bottom: 8px; }
.form-note {
  background: var(--teal-tint);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.94rem;
  color: var(--charcoal);
  margin-top: 18px;
}

/* form status message (shown after submit attempt) */
.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 0.95rem;
}
.form-status.is-ok   { display: block; background: var(--teal-tint); color: var(--teal-dark); }
.form-status.is-err  { display: block; background: #fdecec; color: #9a2a2a; }

/* ---- footer -------------------------------------------------------------- */
.site-footer {
  background: var(--charcoal-deep);
  color: rgba(255,255,255,0.75);
  padding: 44px 0 36px;
  margin-top: 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.site-footer a { color: #fff; }
.footer__tag { font-size: 0.95rem; max-width: 320px; margin-top: 8px; }
.footer__brand strong { color: #fff; font-size: 1.05rem; }
.footer__col h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.footer__col p, .footer__col a { font-size: 0.94rem; display: block; margin-bottom: 5px; }
.footer__copy {
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 26px;
  padding-top: 18px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

/* ---- closing CTA band ---------------------------------------------------- */
.cta-band {
  background: var(--teal-tint);
  text-align: center;
  padding: 64px 0;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { margin: 0 auto; max-width: 520px; }
.cta-band .btn-row { justify-content: center; }

/* ---- page load: gentle staggered reveal --------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise 0.5s ease forwards; }
  .reveal:nth-child(2) { animation-delay: 0.06s; }
  .reveal:nth-child(3) { animation-delay: 0.12s; }
  .reveal:nth-child(4) { animation-delay: 0.18s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
}

/* small helper */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
