/* ==========================================================================
   AMM Tech — custom design layer
   Loaded after the theme stylesheets, so it overrides them.
   Scoped to hook classes added by redesign.py (amm-*) to avoid touching
   unrelated WordPress blocks.
   ========================================================================== */

:root {
  /* ---- Brand palette -------------------------------------------------
     Exact values sampled from the supplied brand sheet
     (assets/brand-color-and-typography.png). */
  --amm-navy:       #263167;
  --amm-orange:     #F78F21;
  --amm-blue:       #0B92D1;
  --amm-black:      #18190E;
  --amm-offwhite:   #E6E6DD;

  --amm-navy-dark:  #1b2450;
  --amm-blue-dark:  #0a76a9;

  /* ---- Typography ----------------------------------------------------
     "Super Road Demo" (display) and "Myriad Pro" (body) are named first so
     they are used wherever licensed copies are installed or self-hosted.
     Neither can be bundled here without a licence — see README. The
     fallbacks are fonts the theme already self-hosts. */
  --amm-font-display: "Super Road Demo", "Jost", "Archivo", "Inter", system-ui, sans-serif;
  --amm-font-body:    "Myriad Pro", "Manrope", "Figtree", "Inter", system-ui, sans-serif;

  --amm-radius: 14px;
  --amm-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --amm-shadow-hover: 0 2px 4px rgba(16, 24, 40, .08), 0 16px 40px rgba(16, 24, 40, .14);
  --amm-border: 1px solid rgba(16, 24, 40, .10);
  --amm-ink: var(--amm-black);
  --amm-muted: color-mix(in srgb, var(--amm-ink) 65%, transparent);
  --amm-surface: #fff;
  --amm-accent: var(--amm-blue);
}

/* --------------------------------------------------------------------------
   0. Brand typography + colour applied site-wide
   -------------------------------------------------------------------------- */

/* The Extendable theme ships a PURPLE palette (primary #381d92, foreground
   #0B0620, tertiary #F2F2FA) which clashed badly with the brand. Every theme
   block colours itself from these presets, so remapping them here rebrands the
   whole site at the source instead of chasing individual blocks. */
:root,
body {
  --wp--preset--color--primary:    var(--amm-navy);
  --wp--preset--color--secondary:  var(--amm-navy-dark);
  --wp--preset--color--tertiary:   #F4F6F8;
  --wp--preset--color--foreground: var(--amm-black);
  --wp--preset--color--background: #ffffff;
}

body {
  font-family: var(--amm-font-body);
  color: var(--amm-ink);
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.amm-card__title,
.amm-footer h3 {
  font-family: var(--amm-font-display);
  color: var(--amm-navy);
  letter-spacing: .005em;
}

/* headings that sit on a dark background keep their light colour */
.amm-hero h1,
.amm-hero h2,
.amm-footer h3 { color: inherit; }
.amm-footer h3 { color: #fff; }

a { color: var(--amm-blue); }
a:hover { color: var(--amm-navy); }

/* primary buttons follow the brand, with orange as the call-to-action accent */
.wp-block-button__link,
.wp-element-button {
  background-color: var(--amm-navy) !important;
  color: #fff !important;
  border-radius: 8px;
  font-family: var(--amm-font-body);
  font-weight: 600;
  transition: background-color .18s ease, transform .18s ease;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--amm-orange) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* the hero's call to action leads with orange */
.amm-hero .wp-block-button__link,
.amm-hero .wp-element-button { background-color: var(--amm-orange) !important; }
.amm-hero .wp-block-button__link:hover,
.amm-hero .wp-element-button:hover { background-color: var(--amm-navy) !important; }

.amm-review__stars { color: var(--amm-orange); }

/* --------------------------------------------------------------------------
   1. Navbar — always pinned to the top; logo + page links only
   -------------------------------------------------------------------------- */

/* The bar itself is invisible at the top of the page — only the logo and the
   menu items show. Once scrolled past 24px, JS adds .is-stuck and the bar
   background fades in behind them. */
/* position:fixed, not sticky. A sticky header still occupies a row in the
   document flow, so it sat in its own band ABOVE the hero with the white page
   background showing through — which is why the bar looked white at the top of
   the page even though it was transparent. Fixed takes it out of flow so the
   hero starts at y=0 and the bar genuinely floats over it. */
.amm-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  /* the theme sets a large clamp() padding inline; tighten it for a nav bar */
  padding-top: .6rem !important;
  padding-bottom: .6rem !important;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.amm-header.is-stuck {
  background: var(--amm-surface);
  border-bottom-color: rgba(16, 24, 40, .10);
  box-shadow: 0 2px 12px rgba(16, 24, 40, .07);
  backdrop-filter: saturate(180%) blur(8px);
}

/* Over the homepage's dark hero the links need to be white to stay readable.
   On pages without a hero the page background is light, so the default dark
   link colour already reads fine against it. */
body.amm-hero-page .amm-header:not(.is-stuck) .wp-block-navigation-item__content,
body.amm-hero-page .amm-header:not(.is-stuck) .wp-block-navigation__submenu-icon {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
body.amm-hero-page .amm-header:not(.is-stuck) .wp-block-navigation__responsive-container-open svg {
  fill: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}

/* Both logo variants ship in the markup; CSS picks the readable one.
   The artwork is transparent now, so the old white "chip" is gone. */
.amm-logo-holder { background: none !important; box-shadow: none !important; border-radius: 0; }
.amm-logo-holder a { display: inline-flex; align-items: center; }

.amm-logo { display: block; }
.amm-logo--light { display: none; }

/* over the dark hero, with the bar still transparent, use the off-white mark */
body.amm-hero-page .amm-header:not(.is-stuck) .amm-logo--color { display: none; }
body.amm-hero-page .amm-header:not(.is-stuck) .amm-logo--light { display: block; }

/* keep the fixed bar from covering in-page anchor targets */
html { scroll-padding-top: calc(var(--amm-header-h, 100px) + 12px); }

/* The bar is out of flow, so pages that do NOT open with a hero need padding
   to stop their first section sliding underneath it. Hero pages want the hero
   to run right up under the bar, so they get none. --amm-header-h is measured
   at runtime by the inline script and falls back to a sensible default. */
body:not(.amm-hero-page) .wp-site-blocks { padding-top: var(--amm-header-h, 100px); }

/* Some page templates give <main> a top padding (96px on the contact template).
   That left a white band above the hero which the transparent bar floated over,
   so the navbar read as solid white. The hero is always the first thing in the
   flow on a hero page, so that leading space has to go. */
body.amm-hero-page main,
body.amm-hero-page .entry-content,
body.amm-hero-page .wp-site-blocks {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.amm-hero-page .amm-hero-wrap:first-child { margin-top: 0 !important; }

/* logo sizing — the new artwork is 1417x931 and tightly cropped */
.amm-header .amm-logo,
.amm-header figure.wp-block-image img,
.amm-header .wp-block-site-logo img {
  width: 104px !important;
  height: auto !important;
  max-width: none !important;
}

/* remove the wordmark and the social icons from the bar */
.amm-header .wp-block-site-title,
.amm-header .wp-block-social-links { display: none !important; }

/* a 100px-tall bar eats too much of a phone screen */
@media (max-width: 781px) {
  .amm-header { padding-top: .4rem !important; padding-bottom: .4rem !important; }
  .amm-header .amm-logo,
  .amm-header figure.wp-block-image img,
  .amm-header .wp-block-site-logo img { width: 76px !important; }
}

/* nav links */
.amm-header .wp-block-navigation-item__content {
  font-weight: 500;
  padding: .4rem .1rem;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.amm-header .wp-block-navigation-item__content:hover {
  color: var(--amm-accent);
  border-bottom-color: var(--amm-accent);
}

/* --------------------------------------------------------------------------
   2. Hero — one shared structure on every page
   -------------------------------------------------------------------------- */

/* The hero sits inside .entry-content, which carries the theme's global side
   padding. Cancel exactly that padding with negative margins — using 100vw here
   would overflow by the scrollbar width and cause horizontal scroll. */
.amm-hero-wrap {
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: calc(var(--wp--style--root--padding-left, 32px) * -1) !important;
  margin-right: calc(var(--wp--style--root--padding-right, 32px) * -1) !important;
}

.amm-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  /* without this the side padding is ADDED to width:100%, pushing the hero
     wider than the viewport and causing horizontal scroll */
  box-sizing: border-box;
  border-radius: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-height: min(88vh, 900px);
  /* clear the fixed navbar so the headline never sits under it */
  padding: calc(var(--amm-header-h, 100px) + clamp(2rem, 6vw, 4rem))
           clamp(1.25rem, 5vw, 4rem)
           clamp(2rem, 6vw, 4rem);
  /* content sits left, text left-aligned */
  justify-content: flex-start;
  text-align: left;
}

/* inner pages get a shorter banner than the homepage */
.amm-hero--page { min-height: min(52vh, 460px); }

/* Homepage: the hero fills the device top to bottom. No aspect-ratio here —
   a fixed ratio cannot also fill an arbitrary viewport, so the image crops to
   fit via object-fit:cover on .amm-hero__bg instead.
   dvh tracks mobile browser chrome collapsing; vh is the fallback. */
.amm-hero--home {
  aspect-ratio: auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.amm-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Per-hero focal point. Heroes are short and full-bleed, so on wide screens
     the crop window narrows and can clip faces. Each page sets
     --amm-hero-focus to keep its subject in frame; 50% is dead centre and a
     lower value reveals more of the top of the photograph. */
  object-position: center var(--amm-hero-focus, 50%);
  z-index: -2;
  margin: 0;
  max-width: none;
}

/* Scrim: a touch stronger at the top, where the transparent navbar sits, so the
   menu items stay readable over a bright photo. */
.amm-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      rgba(24, 25, 14, .70) 0%,
      rgba(24, 25, 14, .55) 34%,
      rgba(24, 25, 14, .64) 100%);
}

/* Some hero photos (the breaker panel on /services/) are very bright, so a flat
   scrim alone leaves white text muddy. A soft navy pool behind the text block
   guarantees contrast without dimming the whole photograph. */
.amm-hero__inner::before {
  content: "";
  position: absolute;
  inset: -8% -12%;
  z-index: -1;
  background: radial-gradient(ellipse at 38% 50%,
    rgba(38, 49, 103, .55) 0%,
    rgba(38, 49, 103, .30) 55%,
    rgba(38, 49, 103, 0) 78%);
  pointer-events: none;
}

.amm-hero__inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(.75rem, 2vw, 1.15rem);
  align-items: flex-start;
}

/* keep the headline to a readable measure while the block itself stays left */
.amm-hero__title,
.amm-hero__sub,
.amm-hero h1,
.amm-hero p { max-width: 22ch; }
.amm-hero__sub,
.amm-hero p { max-width: 46ch; }

/* The homepage headline carries WordPress's .has-text-align-center, which beat
   the inherited alignment and left the h1 centred inside its own box. */
.amm-hero .amm-hero__title,
.amm-hero .amm-hero__sub,
.amm-hero h1,
.amm-hero h2,
.amm-hero p,
.amm-hero .has-text-align-center { text-align: left !important; }

/* On the homepage the original WordPress group still wraps the headline. Its
   constrained layout re-centred the text (h1 started 233px in) and the theme
   put a 55px left margin on the paragraph. Flatten all of that so every hero
   element starts flush at the same left edge. */
.amm-hero__inner > *,
.amm-hero__inner .wp-block-group,
.amm-hero__inner .wp-block-buttons {
  max-width: none !important;
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.amm-hero__inner :where(h1, h2, p) { margin-left: 0 !important; }

.amm-hero h1,
.amm-hero__title {
  color: #fff !important;
  margin: 0;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .38);
  font-size: clamp(2rem, 1.35rem + 2.9vw, 3.6rem);
  line-height: 1.12;
}
.amm-hero--page .amm-hero__title { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 3rem); }

.amm-hero p,
.amm-hero__sub {
  color: var(--amm-offwhite) !important;
  margin: 0;
  font-size: clamp(1rem, .95rem + .35vw, 1.18rem);
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .42);
}

.amm-hero .wp-block-buttons { justify-content: flex-start; }

/* the radial pool follows the text block, so keep it tight to the left column */
.amm-hero__inner::before { inset: -14% -8% -14% -14%; }

/* --- Homepage: show the photograph undarkened -----------------------------
   No scrim and no radial pool, so the image renders at full fidelity.
   The photo is mid-tone where the text sits (measured luminance ~143-169), so
   legibility comes from shadows on the glyphs themselves — that darkens the
   letterforms' immediate edge, not the photograph. */
.amm-hero--home .amm-hero__scrim { display: none; }
.amm-hero--home .amm-hero__inner::before { display: none; }

.amm-hero--home .amm-hero__title,
.amm-hero--home h1 {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .55),
    0 2px 10px rgba(0, 0, 0, .50),
    0 6px 30px rgba(0, 0, 0, .40);
}
.amm-hero--home .amm-hero__sub,
.amm-hero--home p {
  color: #fff !important;
  font-weight: 500;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .60),
    0 2px 10px rgba(0, 0, 0, .55);
}

/* --------------------------------------------------------------------------
   3. Card grids — services and client reviews
   -------------------------------------------------------------------------- */

/* These sections live inside .entry-content, which is a constrained layout and
   caps its children at --wp--style--global--content-size (672px). Break out of
   both the cap and the global side padding so cards get room to breathe. */
.amm-services-section,
.amm-reviews-section {
  max-width: none !important;
  width: auto !important;
  margin-left: calc(var(--wp--style--root--padding-left, 32px) * -1) !important;
  margin-right: calc(var(--wp--style--root--padding-right, 32px) * -1) !important;
}

.amm-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  max-width: 1180px;
  padding: 0;
  list-style: none;
}

.amm-card {
  display: flex;
  flex-direction: column;
  background: var(--amm-surface);
  border: var(--amm-border);
  border-radius: var(--amm-radius);
  box-shadow: var(--amm-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.amm-card:hover { transform: translateY(-4px); box-shadow: var(--amm-shadow-hover); }

/* service card photo — fixed ratio so every card lines up */
.amm-card__media { margin: 0; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #eef1f4; }
.amm-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.amm-card:hover .amm-card__media img { transform: scale(1.04); }

.amm-card__body { padding: clamp(1.1rem, 2.4vw, 1.5rem); display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.amm-card__title { margin: 0; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); line-height: 1.35; }
.amm-card__text { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--amm-muted); }

/* --------------------------------------------------------------------------
   4. Review cards
   -------------------------------------------------------------------------- */

.amm-review { padding: clamp(1.25rem, 2.6vw, 1.75rem); gap: 1rem; }

.amm-review__stars { color: var(--amm-orange); font-size: 1rem; letter-spacing: .12em; line-height: 1; }

.amm-review__quote {
  margin: 0;
  font-size: .97rem;
  line-height: 1.65;
  flex: 1;
}
.amm-review__quote::before { content: "\201C"; }
.amm-review__quote::after  { content: "\201D"; }

.amm-review__person { display: flex; align-items: center; gap: .8rem; margin-top: .35rem; }
.amm-review__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; flex: 0 0 46px; background: #e6eaee;
}
.amm-review__name { margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.3; }
.amm-review__role { margin: 0; font-size: .82rem; color: var(--amm-muted); line-height: 1.35; }

/* --------------------------------------------------------------------------
   5. Footer
   -------------------------------------------------------------------------- */

.amm-footer {
  background: var(--amm-navy);
  color: color-mix(in srgb, var(--amm-offwhite) 82%, transparent);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 4rem) 0;
  margin-top: 0;
}
.amm-footer a { color: color-mix(in srgb, var(--amm-offwhite) 85%, transparent); text-decoration: none; }
.amm-footer a:hover { color: var(--amm-orange); text-decoration: underline; }

.amm-footer__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  max-width: 1180px;
  margin: 0 auto;
}
.amm-footer__brand img { width: 150px; height: auto; margin-bottom: 1rem; }
.amm-footer__tagline { font-size: .92rem; line-height: 1.65; color: color-mix(in srgb, var(--amm-offwhite) 62%, transparent); margin: 0; max-width: 34ch; }

.amm-footer h3 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .09em;
  color: #fff; margin: 0 0 .9rem;
}
.amm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.amm-footer li { font-size: .93rem; line-height: 1.5; }

.amm-footer__contact div { display: flex; gap: .6rem; font-size: .93rem; line-height: 1.55; margin-bottom: .7rem; }
.amm-footer__contact span[aria-hidden] { flex: 0 0 1.1rem; }

.amm-footer__bottom {
  max-width: 1180px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .85rem;
  color: color-mix(in srgb, var(--amm-offwhite) 58%, transparent);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* --------------------------------------------------------------------------
   6. WhatsApp button — a plain link straight to the app, no chat popup
   -------------------------------------------------------------------------- */

.amm-whatsapp {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 1200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.amm-whatsapp:hover,
.amm-whatsapp:focus-visible {
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .34);
  color: #fff;
}
.amm-whatsapp svg { width: 31px; height: 31px; display: block; }

@media (max-width: 781px) {
  .amm-whatsapp { width: 52px; height: 52px; }
  .amm-whatsapp svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .amm-whatsapp { transition: none; }
  .amm-whatsapp:hover, .amm-whatsapp:focus-visible { transform: none; }
}

/* --------------------------------------------------------------------------
   7. Contact page — channel cards + message form
   -------------------------------------------------------------------------- */

.amm-contact-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem);
  max-width: none !important;
  width: auto !important;
  margin-left: calc(var(--wp--style--root--padding-left, 32px) * -1) !important;
  margin-right: calc(var(--wp--style--root--padding-right, 32px) * -1) !important;
}

.amm-contact-grid {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  max-width: 1180px;
  margin: clamp(1.75rem, 4vw, 2.75rem) auto 0;
  align-items: start;
}

.amm-contact-details { display: grid; gap: .9rem; }

.amm-contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.05rem 1.2rem;
  background: var(--amm-surface);
  border: var(--amm-border);
  border-radius: var(--amm-radius);
  box-shadow: var(--amm-shadow);
  text-decoration: none;
  color: var(--amm-ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.amm-contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--amm-shadow-hover);
  border-color: color-mix(in srgb, var(--amm-blue) 45%, transparent);
  color: var(--amm-ink);
}

.amm-contact-card__icon {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--amm-blue) 12%, transparent);
  color: var(--amm-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.amm-contact-card__body { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.amm-contact-card__label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--amm-muted); font-weight: 600;
}
.amm-contact-card__value { font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }

/* ---- form ---- */
.amm-form-wrap {
  background: var(--amm-surface);
  border: var(--amm-border);
  border-radius: var(--amm-radius);
  box-shadow: var(--amm-shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.amm-form-wrap h2 { margin: 0 0 1.1rem; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); }

.amm-form { display: grid; gap: .95rem; }
.amm-field { display: grid; gap: .35rem; }
.amm-field label {
  font-size: .82rem; font-weight: 600; color: var(--amm-navy);
  font-family: var(--amm-font-body);
}
.amm-field input,
.amm-field textarea {
  width: 100%;
  font: inherit;
  font-size: .94rem;
  color: var(--amm-ink);
  background: #fff;
  padding: .7rem .85rem;
  border: 1px solid rgba(24, 25, 14, .18);
  border-radius: 9px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.amm-field textarea { resize: vertical; min-height: 130px; }
.amm-field input::placeholder,
.amm-field textarea::placeholder { color: color-mix(in srgb, var(--amm-ink) 40%, transparent); }
.amm-field input:focus,
.amm-field textarea:focus {
  outline: none;
  border-color: var(--amm-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amm-blue) 22%, transparent);
}
.amm-field input:user-invalid,
.amm-field textarea:user-invalid { border-color: #c0392b; }

.amm-submit {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--amm-navy);
  border: 0;
  border-radius: 9px;
  padding: .75rem 1.6rem;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
.amm-submit:hover { background: var(--amm-orange); transform: translateY(-1px); }
.amm-submit:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--amm-blue) 55%, transparent);
  outline-offset: 2px;
}

/* ---- office map ---- */
.amm-map { max-width: 1180px; margin: clamp(2.5rem, 6vw, 4rem) auto 0; }
.amm-map .amm-section-head { margin-bottom: clamp(1.25rem, 3vw, 1.75rem); }
.amm-map .amm-section-head p { font-size: .95rem; }

.amm-map__frame {
  border: var(--amm-border);
  border-radius: var(--amm-radius);
  overflow: hidden;
  box-shadow: var(--amm-shadow);
  background: #eef1f4;
  line-height: 0;
}
.amm-map__frame iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 45vw, 440px);
  border: 0;
}
.amm-map__link { margin: .9rem 0 0; text-align: center; font-size: .92rem; }

.amm-form-note { margin: 0; font-size: .88rem; line-height: 1.55; }
.amm-form-note:empty { display: none; }
.amm-form-note.is-ok  { color: #1d7a45; }
.amm-form-note.is-err { color: #c0392b; }
.amm-form-note.is-busy { color: var(--amm-muted); }

@media (prefers-reduced-motion: reduce) {
  .amm-contact-card, .amm-submit { transition: none; }
  .amm-contact-card:hover, .amm-submit:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   8. Section rhythm
   -------------------------------------------------------------------------- */

.amm-section-head { text-align: center; max-width: 60ch; margin-inline: auto; }
.amm-section-head p { color: var(--amm-muted); }

@media (prefers-reduced-motion: reduce) {
  .amm-card, .amm-card__media img { transition: none !important; }
  .amm-card:hover { transform: none; }
  .amm-card:hover .amm-card__media img { transform: none; }
}

/* --------------------------------------------------------------------------
   9. Profile-driven content blocks
   -------------------------------------------------------------------------- */

.amm-prose-section, .amm-mv-section, .amm-motto-section,
.amm-compliance-section {
  max-width: none !important;
  width: auto !important;
  margin-left: calc(var(--wp--style--root--padding-left, 32px) * -1) !important;
  margin-right: calc(var(--wp--style--root--padding-right, 32px) * -1) !important;
}

.amm-prose { max-width: 68ch; margin-inline: auto; }
.amm-prose h2 { margin: 0 0 1rem; }
.amm-prose p { margin: 0 0 1rem; line-height: 1.75; }
.amm-prose .amm-lede { font-size: 1.1rem; color: var(--amm-ink); font-weight: 500; }

.amm-mv {
  display: grid; gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  max-width: 1180px; margin-inline: auto;
}
.amm-mv__item {
  background: #fff; border: var(--amm-border); border-radius: var(--amm-radius);
  box-shadow: var(--amm-shadow); padding: clamp(1.4rem, 3vw, 2rem);
}
.amm-mv__item h2 { margin: 0 0 .75rem; font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); }
.amm-mv__item p { margin: 0; line-height: 1.7; color: var(--amm-muted); }

.amm-motto { max-width: 62ch; margin-inline: auto; text-align: center; }
.amm-motto h2 { color: #fff !important; margin: 0 0 .9rem; }
.amm-motto p { color: var(--amm-offwhite); margin: 0; line-height: 1.75; }

.amm-card__list { margin: .6rem 0 0; padding: 0 0 0 1.05rem; }
.amm-card__list li {
  font-size: .88rem; line-height: 1.6; color: var(--amm-muted); margin-bottom: .28rem;
}
.amm-card__list li::marker { color: var(--amm-orange); }

.amm-compliance { max-width: 1180px; margin-inline: auto; text-align: center; }
.amm-compliance h2 { margin: 0 0 .7rem; }
.amm-compliance > p { max-width: 62ch; margin: 0 auto; color: var(--amm-muted); }
.amm-compliance__row {
  display: grid; gap: 1rem; margin-top: clamp(1.5rem, 4vw, 2.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.amm-compliance__item {
  background: #fff; border: var(--amm-border); border-radius: var(--amm-radius);
  box-shadow: var(--amm-shadow); padding: 1.15rem 1rem;
  display: flex; flex-direction: column; gap: .3rem;
}
.amm-compliance__item strong {
  font-family: var(--amm-font-display); color: var(--amm-navy); font-size: 1.05rem;
}
.amm-compliance__item span { font-size: .84rem; color: var(--amm-muted); line-height: 1.5; }

/* --------------------------------------------------------------------------
   10. Motion — smooth transitions and scroll reveals
   Everything here is gated behind prefers-reduced-motion at the end.
   -------------------------------------------------------------------------- */

:root { --amm-ease: cubic-bezier(.22, .61, .36, 1); }

html { scroll-behavior: smooth; }

/* Scroll reveal. Elements start slightly low and faded; JS adds .is-in when
   they enter the viewport. .amm-reveal-ready is set by JS so that with no
   JavaScript the content stays visible instead of being stuck invisible. */
.amm-reveal-ready .amm-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--amm-ease), transform .6s var(--amm-ease);
  will-change: opacity, transform;
}
.amm-reveal-ready .amm-reveal.is-in { opacity: 1; transform: none; }

/* stagger cards within a grid so they cascade rather than pop together */
.amm-grid .amm-reveal:nth-child(2)  { transition-delay: .07s; }
.amm-grid .amm-reveal:nth-child(3)  { transition-delay: .14s; }
.amm-grid .amm-reveal:nth-child(4)  { transition-delay: .21s; }
.amm-grid .amm-reveal:nth-child(5)  { transition-delay: .28s; }
.amm-grid .amm-reveal:nth-child(6)  { transition-delay: .35s; }
.amm-grid .amm-reveal:nth-child(7)  { transition-delay: .42s; }

/* hero content eases in on load */
@keyframes amm-hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.amm-hero__inner > * {
  animation: amm-hero-in .85s var(--amm-ease) both;
}
.amm-hero__inner > *:nth-child(2) { animation-delay: .12s; }
.amm-hero__inner > *:nth-child(3) { animation-delay: .24s; }

/* interactive polish */
a, button, input, textarea, select, .amm-card, .amm-contact-card, .amm-logo,
.wp-block-navigation-item__content, .amm-compliance__item, .amm-mv__item {
  transition:
    color .22s var(--amm-ease),
    background-color .22s var(--amm-ease),
    border-color .22s var(--amm-ease),
    box-shadow .28s var(--amm-ease),
    transform .28s var(--amm-ease),
    opacity .22s var(--amm-ease);
}

.amm-compliance__item:hover,
.amm-mv__item:hover { transform: translateY(-3px); box-shadow: var(--amm-shadow-hover); }

.amm-footer a { transition: color .2s var(--amm-ease), opacity .2s var(--amm-ease); }

/* visible focus for keyboard users, matched to the brand */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--amm-blue) 55%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respect the OS setting: no reveals, no smooth scroll, no movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .amm-reveal-ready .amm-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .amm-hero__inner > * { animation: none !important; }
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
