/* =========================================================================
   ACE Design Build — Design System
   Tone: Premium · Photo-led · Standard rhythm
   Type: Space Grotesk (display) + IBM Plex Sans (body) + IBM Plex Mono (accent)
   Palette: Primary #37b5ff · Accent #0a0a0a · Neutral #70757b
   ========================================================================= */

:root {
  /* Brand palette (from spec) */
  --blue: #37b5ff;
  --blue-deep: #1f93da;
  --ink: #0a0a0a;
  --neutral: #70757b;

  /* Extended surface system (premium = warm off-white + near-black) */
  --paper: #f6f5f2;
  --paper-2: #efede8;
  --white: #ffffff;
  --ink-soft: #16181b;
  --ink-2: #1f2226;

  /* Text */
  --text: #14171a;
  --text-muted: #5d636a;
  --text-invert: #f3f4f5;
  --text-invert-muted: #a6abb1;

  /* Lines */
  --hair: rgba(10, 10, 10, 0.12);
  --hair-invert: rgba(255, 255, 255, 0.14);

  /* Type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Rhythm */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8rem);
  --radius: 2px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--text);
  background: var(--white);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Shared utilities ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--blue);
}
.eyebrow.center::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--blue);
}
.eyebrow--invert { color: var(--blue); }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-top: 1.2rem;
}
.section-head p {
  margin-top: 1.4rem;
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 1.05em 1.7em;
  border-radius: var(--radius);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
  position: relative;
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--blue); color: var(--ink); }

.btn--ghost { border: 1px solid var(--hair); color: var(--text); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--invert { border: 1px solid var(--hair-invert); color: #fff; }
.btn--invert:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); }

.btn--solid-invert { background: #fff; color: var(--ink); }
.btn--solid-invert:hover { background: var(--blue); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hair-invert);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 78px;
}
.nav__logo img { height: 38px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 0.4rem; }
.nav__menu > li > a, .nav__drop > button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text-invert);
  font-size: 0.95rem;
  padding: 0.65em 0.9em;
  border-radius: var(--radius);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav__menu > li > a:hover, .nav__drop > button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav__drop { position: relative; }
.nav__drop > button .caret { transition: transform 0.3s var(--ease); font-size: 0.7em; opacity: 0.8; }
.nav__drop:hover > button .caret, .nav__drop:focus-within > button .caret { transform: rotate(180deg); }

.nav__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 248px;
  background: var(--ink-soft);
  border: 1px solid var(--hair-invert);
  border-radius: var(--radius);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.nav__drop:hover .nav__panel, .nav__drop:focus-within .nav__panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__panel a {
  display: block;
  color: var(--text-invert-muted);
  padding: 0.7em 0.85em;
  font-size: 0.92rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.nav__panel a:hover { color: #fff; background: rgba(55,181,255,0.12); }
.nav__panel a small { display: block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--neutral); margin-top: 2px; }

.nav__cta { display: inline-flex; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav__toggle span { width: 24px; height: 2px; background: #fff; transition: transform 0.3s var(--ease), opacity 0.3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.05) 32%, rgba(10,10,10,0.35) 64%, rgba(10,10,10,0.92) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0) 60%);
}
.hero__inner { position: relative; z-index: 1; width: 100%; padding-block: clamp(3rem, 7vw, 6rem); }
.hero__content { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  margin-top: 1.5rem;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--blue); }
.hero__lead {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--text-invert);
  max-width: 56ch;
  line-height: 1.6;
}
.hero__actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* staggered reveal */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease) forwards; }
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.31s; }
.reveal.d4 { animation-delay: 0.44s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--ink);
  color: var(--text-invert);
  border-bottom: 1px solid var(--hair-invert);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trust__item {
  padding: clamp(1.6rem, 3vw, 2.2rem) clamp(1rem, 2vw, 1.8rem);
  border-left: 1px solid var(--hair-invert);
}
.trust__item:first-child { border-left: none; }
.trust__item .k { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.trust__item .v { margin-top: 0.6rem; font-family: var(--display); font-size: 1.02rem; line-height: 1.3; color: #fff; }

/* ---------- Statement / intro ---------- */
.statement { padding-block: var(--section); background: var(--white); }
.statement__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.statement__lead { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.22; letter-spacing: -0.02em; }
.statement__lead .muted { color: var(--neutral); }
.statement__body p { color: var(--text-muted); margin-bottom: 1.2rem; }
.statement__body p:last-child { margin-bottom: 0; }
.statement__body strong { color: var(--text); font-weight: 600; }

/* ---------- Services ---------- */
.services { padding-block: var(--section); background: var(--paper); }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.svc {
  background: var(--paper);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: background 0.4s var(--ease);
  position: relative;
}
.svc:hover { background: var(--white); }
.svc__num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--neutral); }
.svc__title { font-size: 1.4rem; margin-top: 1.4rem; }
.svc__desc { margin-top: 1rem; color: var(--text-muted); font-size: 0.97rem; flex-grow: 1; }
.svc__tags { margin-top: 1.4rem; font-family: var(--mono); font-size: 0.72rem; color: var(--neutral); letter-spacing: 0.02em; line-height: 1.7; }
.svc__link { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); display: inline-flex; align-items: center; gap: 0.5em; }
.svc__link .arrow { transition: transform 0.3s var(--ease); }
.svc:hover .svc__link { color: var(--blue-deep); }
.svc:hover .svc__link .arrow { transform: translateX(4px); }

/* ---------- Featured project ---------- */
.project { padding-block: var(--section); background: var(--ink); color: var(--text-invert); }
.project__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.project__head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); color: #fff; margin-top: 1.1rem; max-width: 16ch; }
.project__meta { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--text-invert-muted); text-align: right; line-height: 1.9; }
.project__meta b { color: var(--blue); font-weight: 500; }
.project__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; }
.project__hero { overflow: hidden; border-radius: var(--radius); }
.project__hero img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.project__hero:hover img { transform: scale(1.04); }
.project__side { display: grid; grid-template-rows: 1fr 1fr; gap: 1rem; }
.project__thumb { overflow: hidden; border-radius: var(--radius); }
.project__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.project__thumb:hover img { transform: scale(1.05); }
.project__note { margin-top: 2.4rem; max-width: 62ch; color: var(--text-invert-muted); }
.project__note strong { color: #fff; font-weight: 500; }
.project__strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }

/* placeholder flag */
.flag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffcf6b;
  border: 1px dashed rgba(255, 207, 107, 0.5);
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 0.8rem;
}
.flag--dark { color: #9a6b00; border-color: rgba(154,107,0,0.4); }

/* ---------- Why / performance ---------- */
.why { padding-block: var(--section); background: var(--white); }
.why__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.why__list { margin-top: 2rem; display: grid; gap: 1.4rem; }
.why__item { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--hair); }
.why__item:last-child { border-bottom: none; padding-bottom: 0; }
.why__item .n { font-family: var(--mono); font-size: 0.78rem; color: var(--blue-deep); padding-top: 0.25rem; }
.why__item h3 { font-size: 1.18rem; }
.why__item p { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.97rem; }
.why__media { position: relative; }
.why__media img { border-radius: var(--radius); width: 100%; }
.why__badge {
  position: absolute; left: -1px; bottom: -1px;
  background: var(--ink); color: #fff;
  padding: 1.3rem 1.6rem; border-radius: var(--radius);
  max-width: 70%;
}
.why__badge .k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.why__badge .v { font-family: var(--display); font-size: 1.05rem; margin-top: 0.4rem; line-height: 1.3; }

/* ---------- Testimonials ---------- */
.reviews { padding-block: var(--section); background: var(--paper); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.review {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.5vw, 2.2rem);
  display: flex;
  flex-direction: column;
}
.review__stars { color: var(--blue); letter-spacing: 0.18em; font-size: 0.95rem; }
.review__text { margin-top: 1.1rem; font-family: var(--display); font-weight: 500; font-size: 1.12rem; line-height: 1.4; letter-spacing: -0.01em; color: var(--text); flex-grow: 1; }
.review__who { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--neutral); }
.review.is-placeholder { border-style: dashed; background: transparent; }
.review.is-placeholder .review__text { color: var(--neutral); font-style: italic; }

/* ---------- FAQ ---------- */
.faq { padding-block: var(--section); background: var(--white); }
.faq__grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.faq__list { border-top: 1px solid var(--hair); }
.faq__item { border-bottom: 1px solid var(--hair); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .sign { position: relative; width: 16px; height: 16px; flex: none; transition: transform 0.35s var(--ease); }
.faq__item summary .sign::before, .faq__item summary .sign::after { content: ""; position: absolute; background: var(--blue-deep); }
.faq__item summary .sign::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq__item summary .sign::after { top: 0; left: 7px; width: 2px; height: 16px; transition: opacity 0.35s var(--ease); }
.faq__item[open] summary .sign { transform: rotate(180deg); }
.faq__item[open] summary .sign::after { opacity: 0; }
.faq__answer { padding-bottom: 1.6rem; color: var(--text-muted); max-width: 68ch; }

/* ---------- Process ---------- */
.process { padding-block: var(--section); background: var(--paper); }
.process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin-top: 1rem; }
.step { background: var(--paper); padding: clamp(1.7rem, 2.6vw, 2.3rem); }
.step .n { font-family: var(--mono); font-size: 0.74rem; color: var(--blue-deep); letter-spacing: 0.1em; }
.step h3 { font-size: 1.22rem; margin-top: 1.3rem; }
.step p { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- CTA ---------- */
.cta { padding-block: var(--section); background: var(--ink); color: #fff; }
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); color: #fff; margin-top: 1.1rem; }
.cta p { margin-top: 1.4rem; color: var(--text-invert-muted); max-width: 50ch; }
.cta__contact { margin-top: 2rem; display: grid; gap: 0.8rem; font-family: var(--mono); font-size: 0.9rem; }
.cta__contact a { color: #fff; display: inline-flex; gap: 0.6em; align-items: center; transition: color 0.25s; }
.cta__contact a:hover { color: var(--blue); }
.cta__contact .lbl { color: var(--blue); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.7rem; }

.form-embed {
  background: var(--ink-2);
  border: 1px dashed var(--hair-invert);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.form-embed .flag { align-self: center; }
.form-embed h3 { font-size: 1.2rem; color: #fff; }
.form-embed p { margin-top: 0.8rem; color: var(--text-invert-muted); font-size: 0.92rem; max-width: 40ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer { background: #060606; color: var(--text-invert-muted); padding-top: clamp(3.5rem, 6vw, 5.5rem); border-top: 1px solid var(--hair-invert); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(2rem, 4vw, 3rem); padding-bottom: 3rem; }
.footer__brand img { height: 36px; margin-bottom: 1.4rem; }
.footer__brand p { font-size: 0.92rem; max-width: 34ch; }
.footer__col h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.2rem; font-weight: 500; }
.footer__col ul { display: grid; gap: 0.7rem; }
.footer__col a { font-size: 0.92rem; transition: color 0.2s; }
.footer__col a:hover { color: #fff; }
.footer__nap { font-size: 0.92rem; line-height: 1.8; font-style: normal; }
.footer__nap a:hover { color: #fff; }
.footer__map { margin-top: 1.2rem; border-radius: var(--radius); overflow: hidden; line-height: 0; border: 1px solid var(--hair-invert); }
.footer__map iframe { width: 100%; height: 200px; border: 0; filter: grayscale(1) invert(0.92) contrast(0.9); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 1.8rem; border-top: 1px solid var(--hair-invert); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--neutral); }
.footer__bottom a { transition: color 0.2s; }
.footer__bottom a:hover { color: #fff; }
.footer__legal { display: flex; gap: 1.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .statement__grid, .why__grid, .faq__grid, .cta__grid { grid-template-columns: 1fr; }
  .why__media { order: -1; }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .trust__item:nth-child(-n+2) { border-bottom: 1px solid var(--hair-invert); }
  .trust__item:nth-child(odd) { border-left: none; }
  .services__grid, .process__grid { grid-template-columns: repeat(2, 1fr); }
  .reviews__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav__menu { display: none; }
  .nav__toggle { display: flex; }
  .nav__cta { display: none; }

  .mobile-menu { display: block; }
  .nav.is-open + .mobile-menu { max-height: 640px; }

  .project__grid { grid-template-columns: 1fr; }
  .project__side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .services__grid, .process__grid, .trust__grid, .footer__top, .project__side, .project__strip { grid-template-columns: 1fr; }
  .trust__item { border-left: none !important; border-bottom: 1px solid var(--hair-invert); }
  .hero { min-height: 78vh; }
}

/* ---------- Mobile menu panel ---------- */
.mobile-menu {
  display: none;
  overflow: hidden;
  max-height: 0;
  background: var(--ink-soft);
  border-bottom: 1px solid var(--hair-invert);
  transition: max-height 0.45s var(--ease);
}
.mobile-menu__inner { padding: 1rem var(--gutter) 2rem; }
.mobile-menu a, .mobile-menu .m-group > span {
  display: block;
  color: var(--text-invert);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hair-invert);
  font-size: 1rem;
}
.mobile-menu .m-group > span { color: var(--blue); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 1.4rem; }
.mobile-menu .m-sub a { padding-left: 1rem; color: var(--text-invert-muted); font-size: 0.95rem; }
.mobile-menu .btn { margin-top: 1.4rem; width: 100%; justify-content: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
