/*
  WAIACAN — site styles
  Palette rule: ~70% white/light gray, ~20% black, ~10% yellow.
  Yellow is reserved for actions (buttons) and key ideas (accent words) — never full sections.
  On white backgrounds, accent text uses the darker --yellow-text for contrast;
  bright --yellow is only used as text on black.
*/

:root {
  --yellow: #FFB900;
  --yellow-hover: #E5A600;
  --yellow-text: #A87600;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --gray-50: #F5F5F5;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-dark-text: #B4B4B4;
  --gray-dark-line: #262626;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-lg: 20px;

  --container-width: 1200px;
  --gutter: 32px;
  --section-spacing: 112px;
  --header-height: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
}

h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.02em; font-weight: 600; margin-bottom: 12px; }

p {
  margin: 0 0 20px;
  color: var(--gray-500);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

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

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

.section { padding: var(--section-spacing) 0; }
.section-light { background: var(--gray-50); }
.section-dark { background: var(--black); color: var(--white); }
.section-dark p { color: var(--gray-dark-text); }

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}
.section-head p { font-size: 1.125rem; }

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--yellow-text);
  margin-bottom: 20px;
}
.section-dark .eyebrow { color: var(--yellow); }

.text-accent { color: var(--yellow-text); }
.section-dark .text-accent { color: var(--yellow); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 80px;
  align-items: start;
}

.prose p { font-size: 1.075rem; }

.callout {
  font-family: var(--font-heading);
  font-size: 1.35rem !important;
  font-weight: 600;
  color: var(--black) !important;
  padding-left: 20px;
  border-left: 3px solid var(--yellow);
  margin: 32px 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-hover);
  border-color: var(--yellow-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--gray-300);
}
.btn-secondary:hover {
  border-color: var(--black);
  background: var(--gray-50);
}

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--gray-200); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand img {
  height: 40px; /* letters stay 26px tall; the extra height is the larger icon */
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:not(.btn) {
  position: relative;
  padding: 4px 0;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: transform 0.2s ease, top 0.2s ease;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

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

.hero { padding: 112px 0 128px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}

.hero-content { max-width: 780px; }

.hero-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--black);
  margin-bottom: 20px;
}

/*
  Hero word rotator (built by main.js). The window is one line tall with a little extra
  room below so descenders (the "p" in Optimize) aren't clipped; the negative margin
  gives that room back so the line height doesn't change.
*/
.rotator.is-ready {
  display: inline-block;
  vertical-align: top;
  height: 1.2em;
  margin-bottom: -0.1em;
  overflow: hidden;
  transition: width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.rotator-track {
  display: block;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.rotator-track > span {
  display: block;
  width: max-content;
  height: 1.2em;
}

/* On phones and tablets (≤900px) the rotating word gets its own line, so longer words never re-wrap the heading. */
.br-mobile { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero-description {
  max-width: 600px;
  font-size: 1.125rem;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-visual img {
  width: 340px;
}

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

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
}
.card p { margin-bottom: 0; }

.card-num {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yellow-text);
  margin-bottom: 28px;
}

.card .card-tagline {
  font-weight: 500;
  color: var(--black);
  margin-bottom: 12px;
}

.card-cta {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
  justify-content: flex-end;
}
.card-cta p { color: var(--gray-dark-text); }
.card-link {
  margin-top: 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--yellow);
}

/* ---------- Approach ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.step {
  padding-top: 28px;
  border-top: 1px solid var(--gray-dark-line);
  position: relative;
}
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--yellow);
}

.step-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 16px;
}

.step h3 { font-size: 1.4rem; }

.section-dark .step-tagline {
  color: var(--white);
  font-weight: 500;
  margin-bottom: 12px;
}

/* ---------- Why ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}
.values li {
  padding-left: 20px;
  border-left: 2px solid var(--yellow);
}
.values p { margin: 0; }
/* An odd last item (5 values) spans the full row instead of leaving a gap. */
.values li:last-child:nth-child(odd) { grid-column: 1 / -1; }

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

.split-about {
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: center;
}

.about-visual img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 80px;
  align-items: start;
}

.contact-intro p:not(.eyebrow) { font-size: 1.1rem; }

.contact-email {
  margin-top: 32px;
  font-size: 0.95rem !important;
}
.contact-email a {
  color: var(--white);
  border-bottom: 1px solid var(--yellow);
}

.contact-form {
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.field .optional {
  font-weight: 400;
  color: var(--gray-500);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(255, 185, 0, 0.45);
}
.field textarea::placeholder { color: #9CA3AF; }

.contact-form .btn { width: 100%; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* Status text sits inside the white form, so it overrides .section-dark p. */
.section-dark .form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-500);
}
.section-dark .form-status:empty { display: none; }
.section-dark .form-status.is-error { color: #B42318; }

.form-success h3 { font-size: 1.6rem; }
.section-dark .form-success p { color: var(--gray-500); margin: 0; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

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

.site-footer {
  background: var(--black);
  color: var(--white);
  border-top: 1px solid var(--gray-dark-line);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo { height: 24px; width: auto; }

.site-footer p {
  margin: 0;
  color: var(--gray-dark-text);
  font-size: 0.9rem;
}

.footer-tagline { font-family: var(--font-heading); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-meta a:hover { color: var(--yellow); }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
  .hero-visual img { width: 260px; }
}

/* Nav collapses at 900px; hero and split layouts stack at the same breakpoint. */
@media (max-width: 900px) {
  :root { --section-spacing: 80px; }

  .nav-toggle { display: block; }

  .br-mobile { display: inline; }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-200);
  }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 20px; }

  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }

  .split,
  .split-about,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual img { max-width: 220px; margin: 0; }

  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root {
    --section-spacing: 64px;
    --gutter: 20px;
    --header-height: 68px;
  }

  .brand img { height: 34px; }

  .hero { padding: 56px 0 72px; }
  .hero-actions .btn { width: 100%; }

  .section-head { margin-bottom: 40px; }

  .service-grid,
  .steps,
  .values { grid-template-columns: 1fr; }

  .card { padding: 28px 24px; }

  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }

  .btn-lg { width: 100%; padding: 16px 20px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .card,
  .site-nav a::after,
  .nav-toggle span { transition: none; }
}
