/* ============ DESIGN TOKENS ============ */
:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6.5vw, 7rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Boska', 'Georgia', serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* Portuguese-inspired palette: cobalt blue + warm cream + brass gold */
:root,
[data-theme='light'] {
  --color-bg: #faf6ee;
  --color-surface: #ffffff;
  --color-surface-2: #f4eedd;
  --color-surface-offset: #efe5cf;
  --color-surface-offset-2: #e8dcc0;
  --color-divider: #e3d7b9;
  --color-border: #d8caa4;

  --color-text: #1b2b3a;
  --color-text-muted: #5c6b78;
  --color-text-faint: #9aa5ac;
  --color-text-inverse: #faf6ee;

  /* Primary accent — Coutinho Cobalt */
  --color-primary: #1d3f6e;
  --color-primary-hover: #163157;
  --color-primary-active: #0f2340;
  --color-primary-highlight: #d7e1ec;

  /* Secondary accent — Brass Gold */
  --color-gold: #b8842c;
  --color-gold-hover: #9b6d1f;
  --color-gold-active: #7d5817;
  --color-gold-highlight: #eeddb8;

  --color-success: #43703a;
  --color-error: #97363b;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 250 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 250 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 250 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #0f1620;
  --color-surface: #141d29;
  --color-surface-2: #19232f;
  --color-surface-offset: #1c2733;
  --color-surface-offset-2: #212d3a;
  --color-divider: #263341;
  --color-border: #2e3c4b;

  --color-text: #e9e4d6;
  --color-text-muted: #9aa5ac;
  --color-text-faint: #647079;
  --color-text-inverse: #141d29;

  --color-primary: #7ba0d0;
  --color-primary-hover: #98b6dd;
  --color-primary-active: #b3c9e5;
  --color-primary-highlight: #24344a;

  --color-gold: #d8a94e;
  --color-gold-hover: #e3bd70;
  --color-gold-active: #eccf92;
  --color-gold-highlight: #3a3120;

  --color-success: #7fae72;
  --color-error: #c56a6f;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0f1620;
    --color-surface: #141d29;
    --color-surface-2: #19232f;
    --color-surface-offset: #1c2733;
    --color-surface-offset-2: #212d3a;
    --color-divider: #263341;
    --color-border: #2e3c4b;
    --color-text: #e9e4d6;
    --color-text-muted: #9aa5ac;
    --color-text-faint: #647079;
    --color-text-inverse: #141d29;
    --color-primary: #7ba0d0;
    --color-primary-hover: #98b6dd;
    --color-primary-active: #b3c9e5;
    --color-primary-highlight: #24344a;
    --color-gold: #d8a94e;
    --color-gold-hover: #e3bd70;
    --color-gold-active: #eccf92;
    --color-gold-highlight: #3a3120;
  }
}

/* ============ LAYOUT PRIMITIVES ============ */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-12));
}

.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

section + section {
  border-top: 1px solid var(--color-divider);
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--hidden {
  transform: translateY(-100%);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-6);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}
.brand svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-mark {
  height: 46px;
  width: auto;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links {
  display: flex;
  gap: var(--space-6);
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
}
.nav-links a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--color-text);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: grid;
  }
}

@media (max-width: 560px) {
  .nav-actions {
    gap: var(--space-2);
  }
  .nav-actions .btn-primary {
    display: none;
  }
  .brand-name {
    font-size: var(--text-base);
  }
  .brand-name small {
    display: none;
  }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) 0 var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.mobile-menu.is-open {
  display: flex;
}
.mobile-menu a {
  padding: var(--space-3) var(--space-1);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-base);
  border-bottom: 1px solid var(--color-divider);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-gold {
  background: var(--color-gold);
  color: #22160a;
}
.btn-gold:hover {
  background: var(--color-gold-hover);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--color-text) 62%, transparent) 0%,
    color-mix(in oklab, var(--color-text) 40%, transparent) 45%,
    color-mix(in oklab, var(--color-text) 78%, transparent) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #f7f2e5;
  max-width: 760px;
  padding-block: var(--space-24);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e2c98a;
  margin-bottom: var(--space-5);
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: #e2c98a;
  letter-spacing: 0.03em;
  margin-top: calc(var(--space-4) * -1);
  margin-bottom: var(--space-5);
}
.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: #e2c98a;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.03;
  margin-bottom: var(--space-6);
}
.hero h1 em {
  font-style: italic;
  color: #e2c98a;
}
.hero p {
  font-size: var(--text-lg);
  color: #e9e2cf;
  max-width: 52ch;
  margin-bottom: var(--space-8);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.hero-ctas .btn-ghost {
  color: #f7f2e5;
  border-color: color-mix(in oklab, #f7f2e5 40%, transparent);
}
.hero-ctas .btn-ghost:hover {
  border-color: #f7f2e5;
  color: #f7f2e5;
  background: color-mix(in oklab, #f7f2e5 12%, transparent);
}

/* ============ PINSTRIPE DIVIDER ============ */
.tile-divider {
  height: 10px;
  background: linear-gradient(
    to bottom,
    var(--color-primary) 0%,
    var(--color-primary) 20%,
    var(--color-gold) 20%,
    var(--color-gold) 35%,
    transparent 35%,
    transparent 65%,
    var(--color-gold) 65%,
    var(--color-gold) 80%,
    var(--color-primary) 80%,
    var(--color-primary) 100%
  );
  opacity: 0.9;
}

/* ============ SECTION HEADERS ============ */
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-12);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--color-gold);
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.section-head p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: center;
}
.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-copy p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
}
.about-copy p:last-of-type {
  margin-bottom: var(--space-6);
}
.stat-row {
  display: flex;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: -1;
  }
}

.founder-card {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: clamp(var(--space-10), 6vw, var(--space-16));
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
}
.founder-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-primary);
}
.founder-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.founder-title {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}
.founder-bio {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 60ch;
}
@media (max-width: 640px) {
  .founder-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: grid;
  place-items: center;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}
.service-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.service-price {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}
.service-price strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-gold);
  font-weight: 600;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ HOW IT WORKS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: var(--space-10);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-gold);
  display: block;
  margin-bottom: var(--space-3);
}
.step h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: calc(var(--space-10) + 0.5em);
  left: calc(100% + var(--space-4));
  width: calc(var(--space-8) - var(--space-4) * 2 + 4px);
  height: 1px;
  background: var(--color-divider);
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .step:not(:last-child)::after {
    display: none;
  }
}

/* ============ GALLERY ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-4);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.gallery-large {
  grid-row: span 2;
}
.gallery-large img {
  aspect-ratio: 4/5;
}
.gallery-small img {
  aspect-ratio: 4/3;
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery-large {
    grid-row: auto;
  }
}

/* ============ CTA / BOOKING ============ */
.cta-section {
  position: relative;
  background: var(--color-primary);
  color: #f7f2e5;
  overflow: hidden;
}
[data-theme='dark'] .cta-section {
  background: var(--color-surface-offset);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: start;
}
.cta-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-4);
}
.cta-copy p {
  color: color-mix(in oklab, #f7f2e5 78%, transparent);
  margin-bottom: var(--space-6);
  max-width: 46ch;
}
.cta-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.cta-contact-list a {
  color: #f7f2e5;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, #f7f2e5 30%, transparent);
}
.cta-contact-list a:hover {
  border-color: #f7f2e5;
}

.form-card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-lg);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.field label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.field input,
.field select,
.field textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}

@media (max-width: 900px) {
  .cta-inner {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============ FOOTER ============ */
.footer {
  padding-block: var(--space-12);
  background: var(--color-surface-offset);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand svg {
  width: 26px;
  height: 26px;
}

.footer-mark {
  height: 36px;
  width: auto;
}
.footer-brand span {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-text);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
}

/* ============ REVEAL ANIMATION ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
