/* =========================================================
   AZ DIGITAL MARKETING LLC
   Sand palette, Bootstrap 5 base
   ========================================================= */

:root {
  /* Sand palette */
  --page: #faf5ea;        /* dry sand, page background */
  --tint: #f1e7d0;        /* near dune, tinted sections */
  --dune-mid: #e4d3ae;
  --dune-far: #d2b988;
  --line: #d9c79f;        /* dividers and borders */
  --accent: #8a6426;      /* ochre, links and focus */
  --text: #3b2e1e;        /* umber body text */
  --heading: #2a2015;
  --muted: #6b5a43;
  --field: #fffaf0;
  --btn-bg: #3b2e1e;
  --btn-fg: #faf5ea;
  --btn-bg-hover: #54412a;
  --header-bg: rgba(250, 245, 234, 0.9);
  --error: #9a3412;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --header-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dunes at dusk */
    --page: #231b11;
    --tint: #2d2317;
    --dune-mid: #3a2d1c;
    --dune-far: #4b3a23;
    --line: #4d3d27;
    --accent: #dcbb7c;
    --text: #eadfc6;
    --heading: #f6eeda;
    --muted: #bfae8c;
    --field: #1c150d;
    --btn-bg: #e4d3ae;
    --btn-fg: #231b11;
    --btn-bg-hover: #f1e7d0;
    --header-bg: rgba(35, 27, 17, 0.9);
    --error: #f0a37c;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  letter-spacing: -0.02em;
}

p { max-width: 62ch; }

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--heading); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--btn-fg); }

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-sm-pad { padding: 0.55rem 1.15rem; font-size: 0.95rem; }

.btn-sand,
.btn-sand:visited {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-bg);
}
.btn-sand:hover,
.btn-sand:focus-visible,
.btn-sand:active {
  background: var(--btn-bg-hover) !important;
  border-color: var(--btn-bg-hover) !important;
  color: var(--btn-fg) !important;
}

.btn-outline-sand {
  background: transparent;
  color: var(--heading);
  border-color: var(--heading);
}
.btn-outline-sand:hover,
.btn-outline-sand:focus-visible,
.btn-outline-sand:active {
  background: var(--btn-bg) !important;
  border-color: var(--btn-bg) !important;
  color: var(--btn-fg) !important;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .navbar {
  min-height: var(--header-h);
  padding-block: 0.75rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--heading) !important;
}
.logo-suffix {
  font-weight: 500;
  color: var(--muted);
}

.navbar-nav .nav-link {
  color: var(--text);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: 999px;
}
.navbar-nav .nav-link:hover { color: var(--heading); }
.navbar-nav .nav-link.active {
  color: var(--heading);
  background: var(--tint);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

@media (max-width: 991.98px) {
  .navbar-collapse { padding-block: 0.75rem 1rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3.5rem, 9vw, 7.5rem);
}

.hero-copy { position: relative; z-index: 2; }

.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 5.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 17ch;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 54ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Dune ridges: three overlapping ellipses, the nearest one
   takes the colour of the next section so the hero flows into it. */
.dunes {
  position: relative;
  height: clamp(150px, 24vw, 300px);
  margin-top: clamp(2rem, 5vw, 4rem);
}

.dune {
  position: absolute;
  border-radius: 50%;
  transform: translate3d(var(--shift, 0px), 0, 0);
  will-change: transform;
}
.dune-far {
  background: var(--dune-far);
  width: 85%;
  height: 230%;
  left: 38%;
  top: 8%;
}
.dune-mid {
  background: var(--dune-mid);
  width: 110%;
  height: 260%;
  left: -42%;
  top: 30%;
}
.dune-near {
  background: var(--tint);
  width: 200%;
  height: 300%;
  left: -70%;
  top: 50%;
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-tinted { background: var(--tint); }

.section-title {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.section-intro {
  color: var(--muted);
  max-width: 38ch;
}

.lead-text {
  font-size: clamp(1.2rem, 1.9vw, 1.45rem);
  line-height: 1.5;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .sticky-col {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

/* ---------- About ---------- */

.principles {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.principles li {
  border-top: 2px solid var(--heading);
  padding-top: 1rem;
}
.principles h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.principles p {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- FAQ ---------- */

.faq {
  --bs-accordion-bg: transparent;
  --bs-accordion-color: var(--text);
  --bs-accordion-border-color: var(--line);
  --bs-accordion-btn-color: var(--heading);
  --bs-accordion-btn-bg: transparent;
  --bs-accordion-active-color: var(--heading);
  --bs-accordion-active-bg: transparent;
  --bs-accordion-btn-padding-x: 0;
  --bs-accordion-btn-padding-y: 1.35rem;
  --bs-accordion-body-padding-x: 0;
  --bs-accordion-body-padding-y: 0;
  --bs-accordion-btn-focus-box-shadow: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.faq .accordion-button {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  gap: 1rem;
  box-shadow: none;
}
.faq .accordion-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Plus / minus marker drawn in CSS so it follows the palette */
.faq .accordion-button::after {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: auto;
  background-image:
    linear-gradient(var(--heading), var(--heading)),
    linear-gradient(var(--heading), var(--heading));
  background-size: 14px 2px, 2px 14px;
  background-position: center;
  background-repeat: no-repeat;
  transform: none;
  transition: background-size 0.2s ease;
}
.faq .accordion-button:not(.collapsed)::after {
  background-size: 14px 2px, 2px 0;
  transform: none;
}

.faq .accordion-body {
  padding-bottom: 1.5rem;
  padding-right: 2.5rem;
  max-width: 62ch;
}

/* ---------- Services ---------- */

.service-list { margin: 0; }

.service {
  display: grid;
  gap: 0.35rem 2rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }

.service dt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--heading);
}
.service dd {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 768px) {
  .service { grid-template-columns: 15rem 1fr; }
}

.industries {
  margin-top: clamp(4rem, 8vw, 6.5rem);
}

.industry-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.industry-list li {
  padding: 0.6rem 1.15rem;
  border: 1.5px solid var(--dune-far);
  border-radius: 999px;
  background: var(--page);
  color: var(--heading);
  font-weight: 500;
  font-size: 1rem;
}

/* ---------- Contact ---------- */

.contact-details {
  margin: 2.5rem 0 0;
  font-style: normal;
}
.contact-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: 1px solid var(--line); }
.contact-label { color: var(--muted); }
.contact-row a { word-break: break-word; }

.contact-form {
  background: var(--tint);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.contact-form .form-label {
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.contact-form .form-control {
  background: var(--field);
  color: var(--heading);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
}
.contact-form .form-control:focus {
  background: var(--field);
  color: var(--heading);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.contact-form .form-control.is-invalid {
  border-color: var(--error);
  background-image: none;
  padding-right: 1rem;
}
.contact-form .invalid-feedback {
  color: var(--error);
  font-size: 0.92rem;
}

.form-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer p { margin: 0; max-width: none; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .dune { transform: none; }
}
