/* ==========================================================================
   Atollan — Global Business Gateway
   main.css — single stylesheet for all pages
   ========================================================================== */

/* ---- Self-hosted fonts (Hanken Grotesk, OFL-1.1) ---- */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-latin-400-normal.woff2') format('woff2');
}

/* ---- Design tokens ---- */
:root {
  --bg: #f3efe6;
  --bg-sand: #e8e1d2;
  --ink: #17150f;
  --ink-soft: #2a2620;
  --bronze: #92633f;
  --bronze-dark: #7c5333;
  --bronze-light: #c79a72;
  --muted: #4a463b;
  --muted-2: #6b6557;
  --dark-text: #cabfa9;
  --dark-text-2: #a59a86;
  --dark-text-3: #6b6452;
  --hairline: rgba(23, 21, 15, 0.18);
  --hairline-soft: rgba(23, 21, 15, 0.1);
  --hairline-bronze: rgba(199, 154, 114, 0.28);
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}
::selection { background: var(--bronze); color: var(--bg); }
img, svg, video { display: block; }

/* ---- Animations ---- */
@keyframes scrollNudge {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(9px); opacity: 1; }
}
@keyframes heartbeat {
  0% { transform: scale(1); }
  12% { transform: scale(1.13); }
  24% { transform: scale(1); }
  36% { transform: scale(1.13); }
  50% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ---- Scroll-reveal primitives ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.85s ease, transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].in { opacity: 1; transform: none; }
.rise-wrap { overflow: hidden; padding-bottom: 0.05em; }
[data-rise] {
  display: block;
  transform: translateY(116%);
  transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-rise].in { transform: none; }
[data-d="1"] { transition-delay: 0.08s; }
[data-d="2"] { transition-delay: 0.16s; }
[data-d="3"] { transition-delay: 0.26s; }
[data-d="4"] { transition-delay: 0.34s; }

/* ---- Layout helpers ---- */
.page { background: var(--bg); color: var(--ink); overflow-x: hidden; position: relative; }
.container { max-width: 1200px; margin: 0 auto; }
.container--narrow { max-width: 1000px; }
.section { position: relative; padding: 120px 44px; background: var(--bg); }
.section--dark { background: var(--ink); color: var(--bg); overflow: hidden; }
.section--sand { background: var(--bg-sand); overflow: hidden; }
.nowrap { white-space: nowrap; }
.accent { color: var(--bronze); }
.accent-light { color: var(--bronze-light); }
.hl { color: var(--bg); }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 2px;
  line-height: 1;
}

/* ---- Header / navigation ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 44px;
  background: rgba(243, 239, 230, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline-soft);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 34px; width: auto; fill: var(--ink); }
.brand-name { font-size: 24px; letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav a { color: inherit; text-decoration: none; }
.site-nav .nav-cta { color: var(--bronze); border-bottom: 1px solid var(--bronze); padding-bottom: 2px; }
.lang-switch { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.lang-switch a { text-decoration: none; color: inherit; }
.lang-switch a.active { color: var(--bronze); }
.lang-switch .sep { opacity: 0.4; }

/* Hamburger */
#nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin: -8px; }
#nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle.open span:nth-child(2) { opacity: 0; }
#nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
#mobile-menu {
  display: none;
  position: fixed;
  top: 63px; left: 0; right: 0;
  z-index: 99;
  background: rgba(243, 239, 230, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-soft);
  flex-direction: column;
  padding: 16px 22px 24px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(23, 21, 15, 0.08);
}
#mobile-menu a:last-child { border-bottom: 0; color: var(--bronze); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 44px 60px;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  top: 0; right: -6%;
  width: 50vw; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 1.3s ease;
  -webkit-mask-image: radial-gradient(120% 108% at 64% 52%, #000 40%, rgba(0, 0, 0, 0.55) 64%, transparent 85%);
  mask-image: radial-gradient(120% 108% at 64% 52%, #000 40%, rgba(0, 0, 0, 0.55) 64%, transparent 85%);
}
.hero-fade-x { position: absolute; inset: 0; background: linear-gradient(90deg, #f3efe6 0%, rgba(243, 239, 230, 0.4) 22%, transparent 50%); }
.hero-fade-y { position: absolute; inset: 0; background: linear-gradient(0deg, #f3efe6 0%, transparent 26%); }
#hero-logo {
  position: absolute;
  top: 40%; right: 6%;
  transform: translateY(-50%);
  width: 150px; height: 150px;
  z-index: 1;
  pointer-events: none;
}
#hero-logo-flip { position: absolute; inset: 0; }
#hero-logo-img {
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transform-origin: 50% 50%;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}
/* The 3D flip itself is driven by JS (requestAnimationFrame) because Safari's
   compositor can freeze CSS 3D-transform animations mid-flight when sibling
   layers (the fading hero video) change at the same time. Only the simple 2D
   heartbeat — which Safari handles reliably — remains a CSS animation. */
#hero-logo-img.logo-in {
  opacity: 1;
  animation: heartbeat 1.5s ease-in-out infinite;
}
.hero-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; width: 100%; }
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 30px;
}
.hero-eyebrow .dash { width: 36px; height: 1px; background: var(--bronze); }
.hero-title {
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 122px);
  line-height: 0.94;
  margin: 0;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero-copy { margin-top: 48px; max-width: 600px; }
.hero-lede { font-size: 24px; line-height: 1.45; color: var(--ink-soft); margin: 0 0 18px; font-weight: 400; }
.hero-sub { font-size: 16.5px; line-height: 1.8; color: var(--muted-2); margin: 0 0 38px; font-weight: 300; }
.hero-cta { display: flex; gap: 18px; align-items: center; justify-content: flex-start; }
.btn {
  background: var(--ink);
  color: var(--bg);
  padding: 15px 30px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.link-underline {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}
.scroll-cue {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--bronze);
}
.scroll-cue .label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.scroll-cue .line { width: 1px; height: 26px; background: var(--bronze); animation: scrollNudge 1.8s ease-in-out infinite; }

/* ---- Mission ---- */
.mission { padding: 110px 44px; }
.mission-grid { display: grid; grid-template-columns: 0.6fr 2fr; gap: 50px; align-items: start; }
.mission-label {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze-light);
  padding-top: 14px;
}
.mission-text { font-weight: 400; font-size: clamp(21px, 2.4vw, 31px); line-height: 1.45; margin: 0; }

/* ---- Services ---- */
.services-head { padding-bottom: 26px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.section-title { font-weight: 400; font-size: clamp(40px, 5.6vw, 76px); margin: 0; line-height: 0.96; }
.service {
  display: grid;
  grid-template-columns: 0.5fr 2.2fr;
  gap: 30px;
  padding: 38px 0;
  border-bottom: 1px solid var(--hairline);
}
.service-num { font-size: 44px; color: var(--bronze); line-height: 1; }
.service-body { display: grid; grid-template-columns: 1fr 1.6fr; gap: 30px; }
.service-title { font-size: 30px; font-weight: 400; margin: 0; line-height: 1.1; }
.service-desc { color: var(--muted); font-size: 15px; line-height: 1.75; font-weight: 300; margin: 0; }

/* ---- Values ---- */
.values-watermark {
  position: absolute;
  top: -40px; right: 6%;
  font-size: 30vw;
  line-height: 1;
  color: rgba(146, 99, 63, 0.07);
  pointer-events: none;
}
.values-inner { position: relative; }
.values-head { margin-bottom: 60px; }
.values-title { font-weight: 400; font-size: clamp(44px, 6vw, 84px); margin: 0; line-height: 0.96; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 50px; }
.value-card { border-top: 1px solid var(--ink); padding-top: 22px; }
.value-card h3 { font-size: 26px; font-weight: 400; margin: 0 0 12px; }
.value-card p { color: var(--muted); font-size: 14.5px; line-height: 1.7; font-weight: 300; margin: 0; }

/* ---- Industries ---- */
.industries-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.industries-media { position: relative; order: 2; }
.industries-media img { width: 100%; height: auto; }
.industries-copy { order: 1; }
.industries-title { font-weight: 400; font-size: clamp(38px, 5vw, 64px); margin: 0 0 26px; line-height: 0.98; }
.industries-copy > p { color: var(--muted); font-size: 16px; line-height: 1.8; font-weight: 300; margin: 0; }
.cities {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
}
.city {
  position: relative;
  display: inline-block;
  cursor: default;
  color: var(--bronze);
  transition: color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.city::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.city:hover { color: var(--ink); transform: translateY(-3px); }
.city:hover::after { transform: scaleX(1); }

/* ---- Who we are ---- */
.who { padding: 130px 44px; }
.who-circle {
  position: absolute;
  bottom: -60px; left: -60px;
  width: 420px; height: 420px;
  border: 1px solid rgba(199, 154, 114, 0.18);
  border-radius: 50%;
}
.who-inner { position: relative; }
.who-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.who-title { font-weight: 400; font-size: clamp(44px, 6vw, 80px); margin: 0; line-height: 0.96; }
.who-stat {
  font-size: clamp(34px, 4.4vw, 58px);
  color: rgba(199, 154, 114, 0.42);
  text-align: right;
  margin-left: auto;
  white-space: nowrap;
}
.countup { display: inline-block; min-width: 1.15em; text-align: right; font-variant-numeric: tabular-nums; }
.who-lede {
  color: var(--bg);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.5;
  font-weight: 300;
  margin: 0 0 34px;
  max-width: 42ch;
}
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 50px; }
.who-grid p {
  color: var(--dark-text);
  font-size: 15.5px;
  line-height: 1.85;
  font-weight: 300;
  margin: 0;
  border-top: 1px solid var(--hairline-bronze);
  padding-top: 22px;
}

/* ---- Footer / contact ---- */
.site-footer {
  position: relative;
  padding: 120px 44px 48px;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  border-top: 1px solid rgba(199, 154, 114, 0.18);
}
.footer-cta { margin-bottom: 80px; }
.footer-title { font-weight: 400; font-size: clamp(40px, 6.4vw, 96px); margin: 0 0 32px; line-height: 0.98; max-width: 16ch; }
.btn-contact {
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: var(--bronze);
  color: var(--bg);
  padding: 16px 34px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease, letter-spacing 0.4s ease;
}
.btn-contact::before {
  content: "";
  position: absolute;
  top: 0; left: -130%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(243, 239, 230, 0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}
.btn-contact:hover {
  transform: translateY(-3px);
  background: var(--bronze-dark);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.2em;
}
.btn-contact:hover::before { left: 140%; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-top: 50px;
  border-top: 1px solid rgba(199, 154, 114, 0.22);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand-logo { fill: var(--bronze-light); }
.footer-brand .brand-name { color: var(--bronze-light); }
.footer-tagline { color: var(--dark-text-2); font-size: 14px; line-height: 1.8; font-weight: 300; margin: 0; max-width: 320px; }
.footer-col { color: var(--dark-text-2); font-size: 14px; line-height: 1.9; font-weight: 300; }
.footer-label {
  color: var(--bronze-light);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a { color: var(--dark-text); text-decoration: none; display: block; margin-bottom: 8px; }
.copyright { margin-top: 50px; text-align: center; color: var(--dark-text-3); font-size: 12px; letter-spacing: 0.06em; }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-page a { color: inherit; }
.legal-header { position: sticky; top: 0; }
.head-right { display: flex; align-items: center; gap: 24px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.back {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 90px 44px 120px; }
.legal-wrap .eyebrow { margin-bottom: 18px; }
.legal-wrap h1 { font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: 0.98; margin: 0 0 40px; }
.legal-wrap .lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--muted);
  margin: 0 0 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}
.legal-wrap p { color: var(--muted); font-size: 16px; line-height: 1.85; font-weight: 300; margin: 0 0 26px; }
.legal-wrap h2 { font-weight: 400; font-size: 22px; margin: 46px 0 14px; color: var(--ink); }

/* Collapsible sections (native <details>, no JS needed) */
.legal-acc { border-top: 1px solid var(--hairline); }
.legal-acc:last-of-type { border-bottom: 1px solid var(--hairline); margin-bottom: 44px; }
.legal-acc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}
.legal-acc summary::-webkit-details-marker { display: none; }
.legal-acc summary h2 { margin: 0; transition: color 0.3s ease; }
.legal-acc summary:hover h2 { color: var(--bronze); }
.legal-acc summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--bronze);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-acc[open] summary::after { transform: rotate(45deg); }
.legal-acc .acc-body { padding: 2px 0 12px; }
.legal-acc .acc-body p:last-child { margin-bottom: 14px; }
.legal-footer {
  background: var(--ink);
  color: var(--dark-text-3);
  text-align: center;
  padding: 40px 44px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Large → small desktop: shrink hero logo so it never meets the headline */
@media (max-width: 1280px) {
  #hero-logo { width: clamp(110px, 11vw, 150px); height: auto; aspect-ratio: 1; right: 5%; }
}

/* Tablet: 761–1024px */
@media (max-width: 1024px) {
  #hero-logo { display: none; }
  .site-header { padding: 14px 28px; }
  .site-nav { gap: 22px; }
  .hero { padding: 130px 32px 60px; }
  .section, .mission, .who { padding-left: 32px; padding-right: 32px; }
  .site-footer { padding-left: 32px; padding-right: 32px; }
  .service-body { grid-template-columns: 1fr; gap: 10px; }
  .values-grid, .who-grid { grid-template-columns: 1fr 1fr; gap: 34px 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .industries-grid { gap: 40px; }
}

/* Mobile: ≤760px */
@media (max-width: 760px) {
  .site-header { padding: 14px 20px; }
  .site-header .site-nav { display: none; }
  #nav-toggle { display: block; }
  .hero { padding: 104px 22px 64px; min-height: auto; }
  .hero-title { font-size: clamp(34px, 10vw, 58px); }
  .hero-media { width: 100%; left: 0; right: 0; opacity: 0.18; }
  .section, .mission, .who { padding: 76px 22px; }
  .site-footer { padding: 76px 22px; }
  .mission-grid { grid-template-columns: 1fr; gap: 18px; }
  .service { grid-template-columns: 1fr; gap: 4px; }
  .service-body { grid-template-columns: 1fr; gap: 8px; }
  .values-grid { grid-template-columns: 1fr; }
  .industries-grid { grid-template-columns: 1fr; gap: 30px; }
  .who-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-header { padding: 14px 20px; }
  .legal-wrap { padding: 60px 22px 80px; }
}

/* ---- Accessibility: respect reduced-motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], [data-rise] { opacity: 1; transform: none; }
  .scroll-cue .line { animation: none; }
}
