/* ─── RESET & BASE ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; overflow-x: hidden; }

/* ─── CSS VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --accent: #2C8C4A;
  --header-height: 72px;
}

/* ─── ANCHOR SCROLL OFFSET (accounts for fixed header) ─────────────────────── */
#b-about, #b-services, #b-projects, #b-contact {
  scroll-margin-top: var(--header-height);
}

/* ─── SITE WRAPPER ──────────────────────────────────────────────────────────── */
.site {
  background: #F6F1EA;
  color: #0E2841;
  font-family: 'DM Sans', sans-serif;
}

/* ─── HEX PATTERN (decorative SVG overlay) ─────────────────────────────────── */
.hex-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ─── SECTION LABEL (eyebrow line + uppercase text) ────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-label-line {
  width: 36px;
  height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-label-text {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: bold;
}

/* ─── NAV ───────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background 0.4s, box-shadow 0.4s;
}
.nav--scrolled {
  background: rgba(246, 241, 234, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 24px rgba(14, 40, 65, 0.08);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #0E2841;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-link {
  color: rgba(14, 40, 65, 0.5);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  text-transform: uppercase;
}
.nav-link:hover { color: #0E2841; }
.nav-cta {
  background: #0E2841;
  color: #FDFAF6;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.8; }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #0E2841;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
.nav--open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav--open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav--open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── LANG SWITCHER ─────────────────────────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  border-radius: 2px;
  overflow: hidden;
}
.lang-switcher--light { border: 1px solid rgba(14, 40, 65, 0.2); }
.lang-switcher--dark  { border: 1px solid rgba(255, 255, 255, 0.2); }

.lang-btn {
  padding: 6px 11px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: background 0.2s, color 0.2s;
}
.lang-btn--light-active   { background: #0E2841; color: #FDFAF6; }
.lang-btn--light-inactive { color: rgba(14, 40, 65, 0.5); }
.lang-btn--dark-active    { background: rgba(255, 255, 255, 0.15); color: #FDFAF6; }
.lang-btn--dark-inactive  { color: rgba(255, 255, 255, 0.5); }

.lang-divider { width: 1px; height: 16px; }
.lang-divider--light { background: rgba(14, 40, 65, 0.15); }
.lang-divider--dark  { background: rgba(255, 255, 255, 0.15); }

/* ─── HERO ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #EDE4D7 0%, #F6F1EA 60%, #EAE3D6 100%);
  overflow: hidden;
}
.hero-bg-hex {
  position: absolute;
  left: -80px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.06;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 48px 80px;
  width: 100%;
}
.hero .section-label { margin-bottom: 28px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 28px;
  color: #0E2841;
  letter-spacing: -0.01em;
}
.hero-h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-desc {
  font-size: 17px;
  line-height: 1.8;
  color: rgba(14, 40, 65, 0.6);
  max-width: 420px;
  margin-bottom: 48px;
  font-weight: 300;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-cta {
  background: #0E2841;
  color: #FDFAF6;
  padding: 16px 36px;
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}
.hero-cta:hover { transform: translateY(-2px); }
.hero-learn {
  color: rgba(14, 40, 65, 0.5);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-learn-arrow { font-size: 18px; }
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ─── ABOUT ─────────────────────────────────────────────────────────────────── */
.about {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.about-card {
  padding: 32px 28px;
  color: #FDFAF6;
}
.about-card:nth-child(1) { background: #0E2841; }
.about-card:nth-child(2) { background: var(--accent); }
.about-card:nth-child(3) { background: #156082; }
.about-card:nth-child(4) { background: #EDE4D7; color: #0E2841; }

.about-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 12px;
  line-height: 1.2;
  white-space: pre-line;
}
.about-card-desc {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.75;
}
.about-text .section-label { margin-bottom: 24px; }
.about-text h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 28px;
  color: #0E2841;
}
.about-text p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(14, 40, 65, 0.6);
  font-weight: 300;
  margin-bottom: 20px;
}
.about-text p:last-child { margin-bottom: 0; }

/* ─── SERVICES ──────────────────────────────────────────────────────────────── */
.services {
  background: #0E2841;
  padding: 120px 48px;
  position: relative;
  overflow: hidden;
}
.services-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.services h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  color: #FDFAF6;
  margin-bottom: 64px;
  line-height: 1.15;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
}
.service-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 40px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: background 0.3s;
  cursor: default;
}
.service-item:hover { background: rgba(255, 255, 255, 0.08); }
.service-icon { min-width: 40px; height: 40px; }
.service-title {
  font-size: 18px;
  font-weight: 500;
  color: #FDFAF6;
  margin-bottom: 10px;
}
.service-desc {
  font-size: 15px;
  color: rgba(253, 250, 246, 0.5);
  line-height: 1.7;
  font-weight: 300;
}

/* ─── PROJECTS ──────────────────────────────────────────────────────────────── */
.projects {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.projects h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  color: #0E2841;
  margin-bottom: 64px;
  line-height: 1.15;
}
.project-item {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid rgba(14, 40, 65, 0.1);
}
.project-num {
  color: var(--accent);
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  min-width: 40px;
}
.project-text {
  font-size: 18px;
  color: rgba(14, 40, 65, 0.75);
  line-height: 1.6;
  font-weight: 300;
}

/* ─── CONTACT ───────────────────────────────────────────────────────────────── */
.contact {
  background: #EDE4D7;
  padding: 120px 48px;
  position: relative;
  overflow: hidden;
}
.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.contact h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  color: #0E2841;
  margin-bottom: 28px;
  line-height: 1.15;
}
.contact-desc {
  font-size: 16px;
  color: rgba(14, 40, 65, 0.6);
  line-height: 1.8;
  margin-bottom: 48px;
  font-weight: 300;
}
.contact-field { margin-bottom: 24px; }
.contact-field-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.contact-field-value {
  font-size: 15px;
  color: rgba(14, 40, 65, 0.7);
}

/* ─── FORM ──────────────────────────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(14, 40, 65, 0.15);
  border-radius: 2px;
  padding: 16px 20px;
  color: #0E2841;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
textarea.form-input { resize: vertical; }
.form-submit {
  background: #0E2841;
  border: none;
  color: #FDFAF6;
  padding: 16px 36px;
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.2s;
  align-self: flex-start;
}
.form-submit:hover { opacity: 0.8; }

/* ─── FORM SUCCESS ──────────────────────────────────────────────────────────── */
.form-success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 16px;
  text-align: center;
}
.form-success-icon { font-size: 40px; }
.form-success-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: #0E2841;
}
.form-success-sub {
  font-size: 14px;
  color: rgba(14, 40, 65, 0.5);
}

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.footer {
  background: #F6F1EA;
  border-top: 1px solid rgba(14, 40, 65, 0.1);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: #0E2841;
  text-transform: uppercase;
}
.footer-copy {
  font-size: 14px;
  color: rgba(14, 40, 65, 0.35);
}
.footer-link {
  color: rgba(14, 40, 65, 0.35);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }
.contact-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.contact-link:hover { color: var(--accent); }

/* ─── TWEAKS PANEL ──────────────────────────────────────────────────────────── */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  padding: 20px 24px;
  width: 260px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.tweaks-panel-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: #333;
}
.tweaks-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tweaks-colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tweaks-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  outline-offset: 2px;
  transition: outline 0.2s;
}

/* ─── ANIMATIONS ────────────────────────────────────────────────────────────── */
.animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger: about cards */
.about-card:nth-child(2).animate { transition-delay: 0.08s; }
.about-card:nth-child(3).animate { transition-delay: 0.16s; }
.about-card:nth-child(4).animate { transition-delay: 0.24s; }

/* Stagger: service items */
.service-item:nth-child(2).animate { transition-delay: 0.07s; }
.service-item:nth-child(3).animate { transition-delay: 0.14s; }
.service-item:nth-child(4).animate { transition-delay: 0.21s; }
.service-item:nth-child(5).animate { transition-delay: 0.28s; }
.service-item:nth-child(6).animate { transition-delay: 0.35s; }

/* Stagger: project items (3rd–8th child within .projects) */
.projects .project-item:nth-child(4).animate { transition-delay: 0.06s; }
.projects .project-item:nth-child(5).animate { transition-delay: 0.12s; }
.projects .project-item:nth-child(6).animate { transition-delay: 0.18s; }
.projects .project-item:nth-child(7).animate { transition-delay: 0.24s; }
.projects .project-item:nth-child(8).animate { transition-delay: 0.30s; }

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .about-card,
  .service-item,
  .project-item { transition-delay: 0s !important; }
}

/* ─── RESPONSIVE: 1200px ────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .nav          { padding: 0 40px; }
  .hero-inner   { padding: 120px 40px 80px; }
  .about        { padding: 100px 40px; }
  .services     { padding: 100px 40px; }
  .projects     { padding: 100px 40px; }
  .contact      { padding: 100px 40px; }
  .footer       { padding: 36px 40px; }
}

/* ─── RESPONSIVE: 992px ─────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .nav          { padding: 0 32px; height: 64px; }
  .nav-links    { gap: 20px; }

  .hero-inner   { padding: 96px 32px 64px; }
  .hero-grid    { gap: 40px; }
  .hero-visual svg { max-width: 280px; height: auto; }

  .about        { padding: 80px 32px; }
  .about-grid   { gap: 48px; }

  .services     { padding: 80px 32px; }
  .services h2  { margin-bottom: 48px; }

  .projects     { padding: 80px 32px; }

  .contact      { padding: 80px 32px; }
  .contact-inner{ gap: 48px; }

  .footer       { padding: 32px; }
}

/* ─── RESPONSIVE: 768px — stack layouts, mobile nav ────────────────────────── */
@media (max-width: 768px) {
  :root { --header-height: 64px; }

  /* Nav */
  .nav { padding: 0 24px; height: 64px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(246, 241, 234, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 28px;
    gap: 0;
    box-shadow: 0 8px 32px rgba(14, 40, 65, 0.1);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
    z-index: 99;
  }
  .nav--open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid rgba(14, 40, 65, 0.08);
    font-size: 15px;
    color: #0E2841;
  }
  .nav-link:last-of-type { border-bottom: none; }
  .lang-switcher { margin: 20px 0 16px; align-self: flex-start; }
  .nav-cta { text-align: center; padding: 13px 22px; }

  /* Hero — single column, hide decorative visual */
  .hero-inner   { padding: 96px 24px 56px; }
  .hero-grid    { grid-template-columns: 1fr; gap: 0; }
  .hero-visual  { display: none; }
  .hero-desc    { max-width: 100%; }

  /* About — stack, text above cards */
  .about        { padding: 72px 24px; }
  .about-grid   { grid-template-columns: 1fr; gap: 48px; }
  .about-cards  { order: 2; }
  .about-text   { order: 1; }

  /* Services */
  .services          { padding: 72px 24px; }
  .services-grid     { grid-template-columns: 1fr; }
  .service-item      { padding: 28px 24px; }
  .services h2       { margin-bottom: 40px; }

  /* Projects */
  .projects     { padding: 72px 24px; }
  .project-item { gap: 20px; padding: 22px 0; }

  /* Contact */
  .contact       { padding: 72px 24px; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }

  /* Footer */
  .footer { padding: 32px 24px; flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ─── RESPONSIVE: 576px — small phones ─────────────────────────────────────── */
@media (max-width: 576px) {
  .nav { padding: 0 20px; }

  .hero-inner   { padding: 84px 20px 48px; }
  .hero-h1      { font-size: clamp(40px, 10vw, 52px); margin-bottom: 20px; }
  .hero-desc    { font-size: 15px; margin-bottom: 36px; }
  .hero-cta     { padding: 14px 24px; font-size: 12px; }

  .about        { padding: 56px 20px; }
  .about-cards  { grid-template-columns: 1fr; }
  .about-card   { padding: 28px 22px; }
  .about-card-title { font-size: 20px; }

  .services     { padding: 56px 20px; }
  .service-item { padding: 24px 20px; gap: 16px; }

  .projects     { padding: 56px 20px; }
  .projects h2  { margin-bottom: 40px; }
  .project-num  { font-size: 26px; }

  .contact      { padding: 56px 20px; }
  .contact-desc { margin-bottom: 32px; }

  .footer       { padding: 28px 20px; }
}
