/* ==========================================================================
   MOCHA LAND — Corporate Website Stylesheet
   Design tokens live at the top. Edit colors/fonts here only.
   ========================================================================== */

:root {
  /* Brand palette */
  --navy: #0B1F3A;
  --navy-light: #13294B;
  --navy-softer: #1C3A63;
  --gold: #C9A227;
  --gold-light: #E5C558;
  --white: #FFFFFF;
  --off-white: #F7F8FA;

  /* Semantic (light mode default) */
  --bg: var(--off-white);
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --text: #14213B;
  --text-muted: #5B6B85;
  --border: rgba(11, 31, 58, 0.1);
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 20px 60px rgba(11, 31, 58, 0.14);

  /* Fonts */
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Poppins', sans-serif;
  --font-current: var(--font-ar);

  /* Layout */
  --header-h: 84px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --transition: 0.35s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #071527;
  --bg-alt: #0B1F3A;
  --surface: #0F2340;
  --text: #EAF0FB;
  --text-muted: #9FB0CC;
  --border: rgba(229, 197, 88, 0.15);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[dir="rtl"] body { font-family: var(--font-ar); }
html[dir="ltr"] body { font-family: var(--font-en); }

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
svg { width: 1.5em; height: 1.5em; fill: currentColor; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-weight: 800; line-height: 1.3; color: var(--navy); }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: var(--white); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ===== Preloader ===== */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hide { opacity: 0; visibility: hidden; }
.preloader-ship { width: 100px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), height var(--transition);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  height: 70px;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 52px; width: 52px; object-fit: contain; transition: height var(--transition); }
.site-header.scrolled .brand-logo { height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; color: var(--navy); }
[data-theme="dark"] .brand-text strong { color: var(--white); }
.brand-text small { font-size: 0.68rem; letter-spacing: 0.05em; color: var(--gold); text-transform: uppercase; }

.main-nav ul { display: flex; gap: 32px; }
.main-nav a {
  position: relative; font-weight: 600; font-size: 0.95rem; color: var(--text);
  padding: 6px 2px;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: -2px; inset-inline-start: 0;
  width: 0; height: 2px; background: var(--gold); transition: width var(--transition);
}
.main-nav a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--navy); transition: transform var(--transition), background var(--transition), color var(--transition);
  font-weight: 700; font-size: 0.8rem;
}
[data-theme="dark"] .icon-btn { color: var(--gold-light); }
.icon-btn:hover { transform: translateY(-2px); background: var(--gold); color: var(--navy); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.hamburger { display: none; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); transition: var(--transition); border-radius: 2px; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 34px; border-radius: 50px; font-weight: 700; font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy); box-shadow: 0 10px 25px rgba(201,162,39,0.35); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(201,162,39,0.45); }
.btn-outline { border: 1.5px solid rgba(255,255,255,0.55); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-3px); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: radial-gradient(120% 100% at 50% 0%, var(--navy-softer) 0%, var(--navy) 55%, #061021 100%);
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero-viewport { position: absolute; inset: 0; z-index: 0; overflow: hidden; perspective: 1400px; }
.hero-scene {
  position: absolute; inset: -6% ;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  transform: rotateX(0deg) rotateY(0deg);
}
.hero-layer { position: absolute; inset: 0; transform-style: preserve-3d; }
.hero-layer svg { width: 100%; height: 100%; display: block; }
.hero-layer img { width: 100%; height: 100%; object-fit: cover; display: block; }

.layer-photo { transform: translateZ(-90px) scale(1.09); }
.layer-glow  { transform: translateZ(-20px) scale(1.02); }
.layer-fg    { transform: translateZ(45px) scale(0.965); }

.hero-viewport::after {
  content: '';
  position: absolute; inset: 0; z-index: 5;
  background:
    linear-gradient(180deg, rgba(4,10,20,0.75) 0%, rgba(11,31,58,0.35) 30%, rgba(11,31,58,0.55) 65%, #061021 100%),
    radial-gradient(120% 90% at 50% 100%, rgba(6,16,33,0.15) 0%, rgba(6,16,33,0.85) 100%);
  pointer-events: none;
}
.hero-route { position: absolute; inset: 0; opacity: 0.6; z-index: 1; transition: transform 0.25s ease-out; }
.route-svg { width: 100%; height: 100%; }
#shipMarker circle { filter: drop-shadow(0 0 6px var(--gold)); }

.hero-waves { position: absolute; bottom: -2px; inset-inline: 0; line-height: 0; z-index: 1; }
.hero-waves svg { width: 100%; height: 140px; }
.hero-waves path { fill: var(--bg); }

.hero-inner { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-block: 60px 90px; }
.hero-glass {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 50px 60px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Ambient motion for hero photo layer (adds depth/3D feel) */
.layer-photo img { animation: photoBreathe 14s ease-in-out infinite; }
@keyframes photoBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }

#particles circle { animation: particleFloat 6s ease-in-out infinite; }
#particles circle:nth-child(2n) { animation-duration: 8s; animation-delay: -2s; }
#particles circle:nth-child(3n) { animation-duration: 10s; animation-delay: -4s; }
@keyframes particleFloat { 0%,100% { transform: translateY(0); opacity: 0.55; } 50% { transform: translateY(-18px); opacity: 0.9; } }

.hero-viewport, .hero-route { will-change: transform; }
.hero-logo { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 10px 25px rgba(0,0,0,0.35)); }
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); color: var(--white); display: flex; flex-direction: column; gap: 6px; }
.gold-text { background: linear-gradient(135deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline { max-width: 620px; color: rgba(255,255,255,0.8); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

.scroll-cue { position: absolute; bottom: 26px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.5); border-radius: 20px; display: flex; justify-content: center; padding-top: 8px; }
html[dir="rtl"] .scroll-cue { transform: translateX(50%); }
.scroll-cue span { width: 4px; height: 8px; background: var(--gold); border-radius: 4px; animation: scrollDown 1.6s infinite; }
@keyframes scrollDown { 0%{ opacity:1; transform: translateY(0);} 100%{ opacity:0; transform: translateY(14px);} }

/* ===== Section basics ===== */
.section { padding: 110px 0; background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow { display: inline-block; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.section-head.light h2 { color: var(--white); }
.section-head.light { color: rgba(255,255,255,0.75); }

.wave-divider { line-height: 0; margin-top: -1px; }
.wave-divider svg { width: 100%; height: 70px; display: block; }
.wave-divider path { fill: var(--navy); }
.wave-divider.flip path { fill: var(--bg); }

/* ===== About ===== */
.about-lead { max-width: 780px; margin: 0 auto 50px; text-align: center; color: var(--text-muted); font-size: 1.05rem; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.about-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 36px 28px; text-align: center; box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.about-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.about-icon { width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold)); display: flex; align-items: center; justify-content: center; }
.about-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--navy); stroke-width: 1.6; }
.about-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.about-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Services (on navy) ===== */
.services { background: var(--navy); }
.services .eyebrow { color: var(--gold-light); }
.services .section-head h2 { color: var(--white); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(229,197,88,0.15); border-radius: var(--radius-md);
  padding: 34px 24px; text-align: center; transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.service-card:hover { transform: translateY(-10px); background: rgba(229,197,88,0.08); border-color: var(--gold); }
.service-icon { width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 16px; background: rgba(229,197,88,0.12); display: flex; align-items: center; justify-content: center; }
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--gold-light); stroke-width: 1.5; }
.service-card h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { color: rgba(255,255,255,0.65); font-size: 0.92rem; }

/* ===== Why ===== */
.why { background: linear-gradient(160deg, var(--navy-softer), var(--navy) 60%); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card { text-align: center; padding: 30px 16px; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.08); }
.why-num { display: block; font-family: var(--font-en); font-size: 2.4rem; font-weight: 700; color: var(--gold-light); margin-bottom: 8px; }
.why-card h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 8px; }
.why-card p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gallery-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--shadow); transition: transform var(--transition);
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item svg { width: 100%; height: 100%; transition: transform 0.6s ease; }
.gallery-item:hover svg { transform: scale(1.08); }
.gallery-cap {
  position: absolute; inset-inline: 0; bottom: 0; padding: 14px;
  background: linear-gradient(to top, rgba(11,31,58,0.85), transparent);
  color: var(--white); font-size: 0.85rem; font-weight: 600; text-align: start;
  opacity: 0; transform: translateY(10px); transition: var(--transition);
}
.gallery-item:hover .gallery-cap { opacity: 1; transform: translateY(0); }

.lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(7,21,39,0.92);
  display: none; align-items: center; justify-content: center; padding: 40px;
  backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.lightbox-content { max-width: 720px; width: 100%; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-lg); }
.lightbox-content svg, .lightbox-content img { width: 100%; height: auto; display: block; }
.lightbox-close { position: absolute; top: 24px; inset-inline-end: 30px; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.1); color: var(--white); font-size: 1.6rem; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: var(--gold); color: var(--navy); }

/* ===== Contact ===== */
.contact { background: var(--navy); }
.contact .eyebrow { color: var(--gold-light); }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 46px; }
.contact-item { display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(229,197,88,0.15); border-radius: var(--radius-md); padding: 24px; transition: var(--transition); }
.contact-item:hover { background: rgba(229,197,88,0.08); transform: translateY(-6px); }
.contact-icon { width: 48px; height: 48px; flex: none; border-radius: 50%; background: rgba(229,197,88,0.15); display: flex; align-items: center; justify-content: center; }
.contact-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--gold-light); stroke-width: 1.6; }
.contact-item h3 { color: var(--white); font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p, .copy-btn, .mail-link { color: rgba(255,255,255,0.72); font-size: 0.92rem; direction: ltr; display: inline-block; }
.copy-btn { position: relative; font-weight: 600; }
.copy-btn:hover, .mail-link:hover { color: var(--gold-light); }

.whatsapp-cta {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  max-width: 340px; margin: 0 auto; padding: 16px 30px; border-radius: 50px;
  background: linear-gradient(135deg, #25D366, #1DA851); color: #fff; font-weight: 700;
  box-shadow: 0 12px 30px rgba(37,211,102,0.3); transition: var(--transition);
}
.whatsapp-cta:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(37,211,102,0.4); }
.whatsapp-cta svg { width: 26px; height: 26px; fill: #fff; }

.floating-whatsapp {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #1DA851);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px rgba(37,211,102,0.4);
  animation: pulseWA 2.4s infinite;
}
.floating-whatsapp svg { width: 30px; height: 30px; }
@keyframes pulseWA {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.55), 0 14px 30px rgba(37,211,102,0.4); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0), 0 14px 30px rgba(37,211,102,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 14px 30px rgba(37,211,102,0.4); }
}

/* ===== Footer ===== */
.site-footer { background: #061021; padding-top: 70px; position: relative; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 0.6fr; gap: 30px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo { width: 60px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.9rem; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.92rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 12px; align-items: flex-start; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer-social a:hover { background: var(--gold); }
.footer-social svg { width: 18px; height: 18px; fill: none; stroke: rgba(255,255,255,0.8); stroke-width: 1.6; }
.footer-social a:hover svg { stroke: var(--navy); }
.footer-bottom { text-align: center; padding: 22px 0; color: rgba(255,255,255,0.45); font-size: 0.85rem; }

.back-to-top {
  position: absolute; top: -24px; inset-inline-end: 50%; transform: translateX(50%);
  width: 48px; height: 48px; border-radius: 50%; background: var(--gold);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
html[dir="rtl"] .back-to-top { transform: translateX(-50%); }
.back-to-top:hover { transform: translateX(50%) translateY(-4px); }
html[dir="rtl"] .back-to-top:hover { transform: translateX(-50%) translateY(-4px); }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: var(--navy); stroke-width: 2; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 30px; inset-inline-start: 50%; transform: translateX(-50%) translateY(30px);
  background: var(--navy); color: var(--white); padding: 14px 28px; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-lg); z-index: 3000;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--gold);
}
html[dir="rtl"] .toast { transform: translateX(50%) translateY(30px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
html[dir="rtl"] .toast.show { transform: translateX(50%) translateY(0); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid, .services-grid, .why-grid, .contact-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: var(--header-h); inset-inline: 0; bottom: 0;
    background: var(--bg); backdrop-filter: blur(20px);
    transform: translateY(-120%); opacity: 0; transition: var(--transition);
    padding: 30px 24px; z-index: 999; overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav ul { flex-direction: column; gap: 8px; }
  .main-nav a { display: block; padding: 16px; font-size: 1.1rem; border-bottom: 1px solid var(--border); }
  .hamburger { display: flex; }
}

@media (max-width: 640px) {
  .about-grid, .services-grid, .why-grid, .contact-grid, .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-social { justify-content: center; }
  .section { padding: 80px 0; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}
