/* ============================================================
   Maple Structural Engineering
   Palette: Maple Red #C8102E  |  White #FFFFFF  |  Ink #0B0B0C
   ============================================================ */

:root {
  --maple: #c8102e;
  --maple-dark: #9a0b22;
  --maple-soft: #fde8ec;
  --white: #ffffff;
  --bg: #fafafa;
  --ink: #0b0b0c;
  --ink-2: #2a2a2e;
  --muted: #5a5a62;
  --line: #e7e7ea;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, 0.06);
  --shadow-md: 0 10px 30px rgba(16, 16, 20, 0.08);
  --shadow-lg: 0 30px 80px rgba(16, 16, 20, 0.14);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  color: var(--muted);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: "Fraunces", "Inter", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.4em;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 780px;
}

.section {
  padding: 120px 0;
}
.section--dark {
  background: var(--ink);
  color: #e9e9ee;
}
.section--dark p {
  color: #a9a9b3;
}
.section--dark h3 {
  color: #fff;
}

.section__head {
  max-width: 780px;
  margin: 0 auto 64px;
  text-align: center;
}
.section__title {
  font-size: clamp(32px, 4.2vw, 52px);
}
.section__title--light {
  color: #fff;
}
.section__sub {
  font-size: 18px;
  margin-top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn--lg {
  padding: 14px 24px;
  font-size: 15.5px;
}
.btn--primary {
  background: var(--maple);
  color: #fff;
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.25);
}
.btn--primary:hover {
  background: var(--maple-dark);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--ink);
}
.btn--ghost-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--ghost-dark:hover {
  border-color: #fff;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--maple-soft);
  color: var(--maple);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.eyebrow--center {
  display: inline-flex;
}
.eyebrow--light {
  background: rgba(255, 255, 255, 0.08);
  color: #ffd4dc;
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--maple);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.15);
}

.accent {
  color: var(--maple);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav.is-scrolled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav__logo {
  width: 28px;
  height: 28px;
}
.nav__name {
  font-size: 17px;
}
.nav__name--accent {
  color: var(--maple);
  margin-left: 4px;
}
.nav__links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav__links a:hover {
  color: var(--maple);
}
.nav__cta {
  display: flex;
  gap: 10px;
}

@media (max-width: 820px) {
  .nav__links {
    display: none;
  }
  .nav__cta .btn--ghost {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 40px;
}
.hero__bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 640px;
  background: radial-gradient(
      80% 60% at 50% 0%,
      rgba(200, 16, 46, 0.12),
      rgba(200, 16, 46, 0) 70%
    ),
    radial-gradient(60% 40% at 80% 20%, rgba(200, 16, 46, 0.08), rgba(200, 16, 46, 0) 70%);
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 32px;
}
.hero__title {
  font-size: clamp(44px, 7vw, 84px);
  margin: 18px auto 18px;
  max-width: 16ch;
}
.hero__sub {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 18px;
  color: var(--muted);
}
.hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero__meta {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.hero__meta strong {
  display: block;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.hero__meta span {
  display: block;
  margin-top: 2px;
}

.hero__figure-wrap {
  position: relative;
  z-index: 1;
  margin-top: 40px;
}
.hero__figure {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero__figure-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #f5f5f7;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.hero__figure-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e0e0e5;
}
.hero__figure-bar .dot:nth-child(1) {
  background: #ff5f57;
}
.hero__figure-bar .dot:nth-child(2) {
  background: #febc2e;
}
.hero__figure-bar .dot:nth-child(3) {
  background: #28c840;
}
.hero__figure-title {
  margin-left: 10px;
  font-weight: 500;
  color: var(--ink-2);
}
.hero__figure img {
  width: 100%;
  display: block;
}

/* ---------- Trust ---------- */
.trust {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.trust__inner {
  text-align: center;
}
.trust__label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 20px;
}
.trust__logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  color: #a4a4af;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d9d9de;
}
.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--maple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card__icon img {
  width: 22px;
  height: 22px;
}
.card h3 {
  font-size: 20px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 15px;
}

/* ---------- Feature blocks ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
}
.feature + .feature {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.feature--reverse .feature__text {
  order: 2;
}
.feature__text .step {
  display: inline-block;
  color: var(--maple);
  background: rgba(200, 16, 46, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.feature__text h3 {
  font-size: clamp(26px, 3vw, 36px);
  color: #fff;
}
.feature__text p {
  font-size: 17px;
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 28px;
  color: #cfcfd6;
  font-size: 15px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--maple);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.5l2.3 2.3L9.5 3.6'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.feature__media {
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.feature__media img {
  width: 100%;
  display: block;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0;
  }
  .feature--reverse .feature__text {
    order: 0;
  }
}

/* ---------- Projects ---------- */
.grid--projects {
  gap: 28px;
}
.project {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.project__media {
  aspect-ratio: 4 / 3;
  background: #f1f1f4;
  overflow: hidden;
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project__body {
  padding: 22px;
}
.project__body h3 {
  font-size: 20px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
}
.project__body p {
  margin: 0;
  font-size: 14.5px;
}
.tag {
  display: inline-block;
  background: var(--maple-soft);
  color: var(--maple);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Stats ---------- */
.stats {
  background: var(--maple);
  color: #fff;
  padding: 60px 0;
}
.stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stats__item strong {
  font-family: "Fraunces", serif;
  display: block;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.02em;
}
.stats__item span {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 4px;
}
@media (max-width: 760px) {
  .stats__inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
}
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.faq details[open] {
  border-color: var(--maple);
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.08);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--maple);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after {
  content: "–";
}
.faq p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- CTA ---------- */
.cta {
  background: var(--ink);
  color: #fff;
  padding: 110px 0;
  text-align: center;
}
.cta h2 {
  color: #fff;
  font-size: clamp(34px, 4.5vw, 56px);
}
.cta p {
  color: #b5b5be;
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 18px;
}
.cta__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.footer__copy {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.footer__links {
  display: flex;
  gap: 22px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.footer__links a:hover {
  color: var(--maple);
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
