@import "./brand-tokens.css";

/* ---------------------------------------------------------
   Tokens
   Raw + semantic + component tokens live in brand-tokens.css
   (source of truth: BRAND-GUIDE.md). The aliases below just give
   the existing component rules in this file their historical
   names; the "derived" pair is documented because the brand
   guide has no dedicated muted-text/border token for dark
   petroleum surfaces.
--------------------------------------------------------- */
:root {
  --font-sans: "Manrope Variable", "Manrope", system-ui, -apple-system, sans-serif;

  --color-petrol: var(--brand-petroleum-700);
  --color-petrol-dark: var(--brand-petroleum-950);
  --color-terracotta: var(--brand-coral-500);

  --color-bg: var(--color-canvas);
  --color-bg-alt: var(--color-surface);
  --color-surface-card: var(--card-bg);
  --color-text: var(--neutral-900);
  --color-text-muted: var(--neutral-600);
  --color-border: var(--neutral-200);

  --color-hero-text: var(--neutral-0);
  /* derived: brand-petroleum-100 at 72% opacity, no on-dark muted token in the brand guide */
  --color-hero-text-muted: rgba(217, 234, 237, 0.72);
  /* derived: neutral-0 at 14% opacity, no on-dark hairline-border token in the brand guide */
  --color-hero-border: rgba(252, 253, 252, 0.14);

  --radius-hero: 24px;
  --radius-panel: 18px;
  --radius-input: 12px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --duration-fast: 160ms;
  --duration-base: 220ms;

  --shell-max: 1360px;
  --content-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

address {
  font-style: normal;
}

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

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background: var(--color-petrol-dark);
  color: var(--color-hero-text);
  padding: 12px 20px;
  border-radius: var(--radius-input);
  transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus-visible {
  top: 16px;
}

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

/* ---------------------------------------------------------
   Layout helpers
--------------------------------------------------------- */
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-heading {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.section-heading p {
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* small text needs the accessible action tone, not the decorative accent */
  color: var(--brand-coral-700);
  margin: 0 0 18px;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--duration-fast) var(--ease-out),
    background-color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
  min-height: 44px;
}

.button--pill {
  border-radius: var(--radius-pill);
}

.button--block {
  width: 100%;
}

.button--accent {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}

.button--accent:hover {
  background: var(--button-primary-bg-hover);
}

.button--ghost {
  background: transparent;
  color: var(--color-hero-text);
  border-color: var(--color-hero-border);
}

.button--ghost:hover {
  border-color: rgba(252, 253, 252, 0.4);
  background: rgba(252, 253, 252, 0.06);
}

.button--outline {
  background: transparent;
  color: var(--button-secondary-text);
  border-color: var(--button-secondary-border);
}

.button--outline:hover {
  background: var(--color-surface-soft-brand);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translateY(-1px);
  }
}

.button:active {
  transform: scale(0.97);
}

/* ---------------------------------------------------------
   WhatsApp picker — pill button stays untouched; the panel is
   pinned behind it at half its height and grows out from there,
   like a drawer sliding down from behind the pill.
--------------------------------------------------------- */
.whatsapp-picker {
  --picker-trigger-half: 22px; /* half of .button's 44px min-height */
  position: relative;
  display: inline-block;
}

.whatsapp-picker__trigger {
  position: relative;
  z-index: 2;
}

.whatsapp-picker__panel {
  position: absolute;
  top: var(--picker-trigger-half);
  left: 0;
  right: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out);
}

.whatsapp-picker:has(.whatsapp-picker__trigger[aria-expanded="true"]) .whatsapp-picker__panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.whatsapp-picker__panel-inner {
  overflow: hidden;
  background: var(--neutral-0);
  border-bottom-left-radius: var(--radius-panel);
  border-bottom-right-radius: var(--radius-panel);
  box-shadow: 0 20px 32px rgba(6, 45, 54, 0.22);
  padding-top: var(--picker-trigger-half);
}

.whatsapp-picker__option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  transition: background-color var(--duration-base) var(--ease-out);
}

.whatsapp-picker__option:last-child {
  padding-bottom: 16px;
}

.whatsapp-picker__option:not(:first-child) {
  border-top: 1px solid var(--color-border);
}

.whatsapp-picker__option:hover {
  background: var(--color-surface-soft-brand);
}

.whatsapp-picker__option i {
  color: var(--color-terracotta);
}

/* ---------------------------------------------------------
   Header / Navigation
--------------------------------------------------------- */
.hero {
  background: radial-gradient(120% 140% at 14% 0%, var(--color-petrol) 0%, var(--color-petrol-dark) 100%);
}

.hero__shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  position: relative;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 20px 0 28px;
  position: relative;
  z-index: 2;
}

.site-header__logo img {
  height: 34px;
  width: auto;
}

.site-nav {
  display: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.site-nav__list a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-hero-text-muted);
  transition: color var(--duration-base) var(--ease-out);
}

.site-nav__list a:hover {
  color: var(--color-hero-text);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__actions .whatsapp-picker {
  display: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-input);
  color: var(--color-hero-text);
  font-size: 1.35rem;
  transition: background-color var(--duration-base) var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(243, 245, 244, 0.08);
}

.mobile-menu {
  position: relative;
  z-index: 2;
  padding: 0 24px 28px;
  display: grid;
  gap: 20px;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__list {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--color-hero-border);
  padding-top: 16px;
}

.mobile-menu__list a {
  display: block;
  padding: 12px 4px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-hero-text);
}

/* ---------------------------------------------------------
   Hero content
--------------------------------------------------------- */
.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 12px 28px 56px;
}

.hero__copy {
  max-width: 620px;
}

.hero__headline {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 800;
  color: var(--color-hero-text);
}

.hero__lead {
  margin-top: 20px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-hero-text-muted);
  max-width: 46ch;
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__visual {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius-panel);
  background: linear-gradient(160deg, rgba(243, 245, 244, 0.06), rgba(243, 245, 244, 0.01));
  border: 1px solid var(--color-hero-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__visual-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 70% 20%, rgba(198, 107, 74, 0.16), transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.hero__visual-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* ---------------------------------------------------------
   Trust strip
--------------------------------------------------------- */
.trust-strip {
  background: var(--color-surface-card);
  border-bottom: 1px solid var(--color-border);
}

.trust-strip__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  gap: 20px;
}

.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-petrol);
}

.trust-strip__item i {
  font-size: 1.25rem;
  color: var(--color-terracotta);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   About
--------------------------------------------------------- */
.about {
  position: relative;
  padding: 96px 0;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  /* 40% larger than the section in every direction so cover always fills it
     fully, on any aspect ratio (mobile included), with room to drift without
     ever exposing an edge */
  inset: -20%;
  background: url("/assets/texture-waves.svg") center / cover no-repeat;
  opacity: 0.95;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .about::before {
    animation: about-texture-drift 36s ease-in-out infinite;
  }
}

@keyframes about-texture-drift {
  0% {
    transform: translate(-4%, -3%);
  }
  50% {
    transform: translate(4%, 3%);
  }
  100% {
    transform: translate(-4%, -3%);
  }
}

.about__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.about__inner h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.about__lead {
  margin-top: 22px;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--color-text);
}

.about__support {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------
   Practice areas
--------------------------------------------------------- */
.practice {
  padding: 32px 0 96px;
}

.practice__grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 20px;
}

.practice-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.practice-card i {
  font-size: 1.75rem;
  color: var(--color-terracotta);
}

.practice-card__icon-img {
  width: 40px;
  height: 40px;
}

.practice-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.practice-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.practice-card--petrol,
.practice-card--coral {
  border-color: transparent;
}

.practice-card--petrol {
  background: radial-gradient(120% 140% at 20% 0%, var(--color-petrol) 0%, var(--color-petrol-dark) 100%);
}

.practice-card--coral {
  background: var(--brand-coral-700);
}

.practice-card--petrol i {
  color: var(--brand-coral-500);
}

.practice-card--petrol h3,
.practice-card--coral i,
.practice-card--coral h3 {
  color: var(--neutral-0);
}

.practice-card--petrol p {
  color: var(--color-hero-text-muted);
}

.practice-card--coral p {
  /* derived: neutral-0 at 82% opacity, muted body copy on the coral card */
  color: rgba(252, 253, 252, 0.82);
}

/* ---------------------------------------------------------
   How it works
--------------------------------------------------------- */
.how-it-works {
  padding: 0 0 96px;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.steps__item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 2px solid var(--color-petrol);
}

.steps__item i {
  font-size: 1.5rem;
  color: var(--color-terracotta);
}

.steps__item h3 {
  font-size: 1.1875rem;
  font-weight: 700;
}

.steps__item p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------
   FAQ Accordion
--------------------------------------------------------- */
.faq {
  padding: 0 0 96px;
}

.accordion {
  border-top: 1px solid var(--color-border);
}

.accordion__item {
  border-bottom: 1px solid var(--color-border);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.accordion__trigger i {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--color-terracotta);
  transition: transform var(--duration-base) var(--ease-out);
}

.accordion__trigger[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-base) var(--ease-out);
}

.accordion__panel-inner {
  overflow: hidden;
}

.accordion__item:has(.accordion__trigger[aria-expanded="true"]) .accordion__panel {
  grid-template-rows: 1fr;
}

.accordion__panel p {
  padding: 0 4px 22px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ---------------------------------------------------------
   Final contact
--------------------------------------------------------- */
.contact {
  padding: 0 0 96px;
}

.contact__inner {
  background: radial-gradient(120% 140% at 14% 0%, var(--color-petrol) 0%, var(--color-petrol-dark) 100%);
  border-radius: var(--radius-hero);
  padding: 56px 32px;
  display: grid;
  gap: 40px;
  color: var(--color-hero-text);
}

.contact__copy h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.contact__copy p {
  margin-top: 14px;
  color: var(--color-hero-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 44ch;
}

.contact__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.contact__buttons .button {
  margin-top: 0;
}

.contact__list {
  display: grid;
  gap: 16px;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9375rem;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-hero-border);
}

.contact__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  align-items: flex-start;
}

.contact__list i {
  font-size: 1.25rem;
  color: var(--brand-coral-500);
  flex-shrink: 0;
}

.contact__list a {
  color: var(--color-hero-text);
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--duration-base) var(--ease-out),
    text-decoration-color var(--duration-base) var(--ease-out);
}

.contact__list a:hover {
  /* accent conveyed via underline, not a color swap: Coral 500 text fails AA on this dark surface */
  text-decoration: underline;
  text-decoration-color: var(--brand-coral-500);
}

.contact__list span {
  color: var(--color-hero-text-muted);
  line-height: 1.5;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 56px 0 0;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.site-footer__brand {
  display: inline-flex;
  padding: 14px 20px;
  border-radius: var(--radius-panel);
  background: var(--color-petrol-dark);
  width: fit-content;
  align-self: start;
}

.site-footer__brand img {
  height: 28px;
  width: auto;
}

.site-footer__col-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 16px;
}

.site-footer__nav,
.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__nav a,
.site-footer__contact a {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-underline-offset: 3px;
  transition: color var(--duration-base) var(--ease-out);
}

.site-footer__nav a:hover,
.site-footer__contact a:hover {
  /* small text on a light surface needs Coral 700 (Coral 500 fails AA here) */
  color: var(--brand-coral-700);
  text-decoration: underline;
}

.site-footer__contact a {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
}

.site-footer__contact a i {
  font-size: 1.0625rem;
  color: var(--color-terracotta);
  flex-shrink: 0;
  margin-top: 2px;
}

.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer__bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.site-footer__disclaimer {
  max-width: 480px;
}

/* ---------------------------------------------------------
   Scroll reveal
--------------------------------------------------------- */
/* Default: fully visible. Motion is opt-in, enabled only once JS confirms
   it can also reveal the content again (see the blocking script in <head>).
   This guarantees content is never stuck invisible if JS fails or is disabled. */
.reveal,
.reveal-load {
  opacity: 1;
  transform: none;
}

.js-motion .reveal,
.js-motion .reveal-load {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.js-motion .reveal.is-visible,
.js-motion .reveal-load.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-load--delay {
  transition-delay: 120ms;
}

.practice__grid .reveal.is-visible:nth-child(1) { transition-delay: 0ms; }
.practice__grid .reveal.is-visible:nth-child(2) { transition-delay: 60ms; }
.practice__grid .reveal.is-visible:nth-child(3) { transition-delay: 120ms; }
.practice__grid .reveal.is-visible:nth-child(4) { transition-delay: 180ms; }

.steps .reveal.is-visible:nth-child(1) { transition-delay: 0ms; }
.steps .reveal.is-visible:nth-child(2) { transition-delay: 60ms; }
.steps .reveal.is-visible:nth-child(3) { transition-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  .js-motion .reveal,
  .js-motion .reveal-load {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (min-width: 768px) {
  .trust-strip__inner {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
  }

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

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact__inner {
    grid-template-columns: 1.1fr 1fr;
    padding: 64px 56px;
  }

  .site-footer__inner {
    grid-template-columns: auto 1fr 1fr;
    gap: 48px;
  }
}

@media (min-width: 1024px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .site-header__logo {
    justify-self: start;
  }

  .site-nav {
    display: flex;
    justify-self: center;
  }

  .site-header__actions {
    justify-self: end;
  }

  .site-header__actions .whatsapp-picker {
    display: inline-block;
  }

  .nav-toggle {
    display: none;
  }

  .hero__content {
    grid-template-columns: 1.05fr 0.85fr;
    align-items: center;
    min-height: 480px;
    padding: 24px 28px 64px;
  }

  .hero__visual {
    min-height: 420px;
  }

  .about {
    padding: 128px 0;
  }

  .practice {
    padding: 48px 0 128px;
  }

  .how-it-works {
    padding-bottom: 128px;
  }

  .faq {
    padding-bottom: 128px;
  }

  .contact {
    padding-bottom: 128px;
  }
}

@media (max-width: 1023px) {
  .mobile-menu {
    display: none;
  }

  .mobile-menu.is-open {
    display: grid;
  }
}
