/* ==========================================================================
   Batavia Decorative Paints Trading — style.css
   Palette pulled from logo rainbow: coral, amber, gold, emerald, teal
   ========================================================================== */

:root {
  --c-ink: #0d1520;
  --c-ink-2: #1a2332;
  --c-muted: #5b6472;
  --c-line: #e6e9ee;
  --c-bg: #ffffff;
  --c-bg-2: #f7f5f1;
  --c-bg-3: #f2ede4;

  /* Brand — pulled from logo rainbow */
  --c-coral: #e74c3c;
  --c-amber: #f39c1f;
  --c-gold: #f4c430;
  --c-emerald: #2ecc71;
  --c-teal: #1abc9c;
  --c-sky: #56a8d8;
  --c-plum: #7d4a99;

  --c-primary: #b8863b;   /* refined gold, catalog cover */
  --c-primary-dk: #8f6425;
  --c-accent: #c9a15a;

  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(20, 25, 35, 0.06);
  --shadow: 0 20px 60px rgba(20, 25, 35, 0.10);
  --shadow-lg: 0 30px 80px rgba(20, 25, 35, 0.16);

  --f-serif: "Playfair Display", "Times New Roman", serif;
  --f-sans: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-arabic: "Cairo", "Segoe UI", "Tahoma", sans-serif;

  --container: 1200px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--f-arabic); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: var(--f-arabic); font-weight: 700; letter-spacing: 0;
}
p { margin: 0 0 1em; }
ul { list-style: none; padding: 0; margin: 0; }
::selection { background: var(--c-primary); color: #fff; }

.skip-link {
  position: absolute; top: -100px; left: 0; padding: 10px 16px;
  background: var(--c-ink); color: #fff; z-index: 999;
}
.skip-link:focus { top: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* -- Eyebrow / helpers -- */
.eyebrow {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-primary);
  padding: 6px 12px;
  border: 1px solid rgba(184, 134, 59, 0.3);
  border-radius: 999px;
  background: rgba(184, 134, 59, 0.06);
  margin-bottom: 20px;
}
html[lang="ar"] .eyebrow { font-family: var(--f-arabic); letter-spacing: 0; }

.section { padding: 110px 0; position: relative; }
.section__head { max-width: 780px; margin: 0 auto 60px; text-align: center; }
.section__title { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; }
.section__lead { font-size: 18px; color: var(--c-muted); margin-top: 18px; }
.section__body { color: var(--c-muted); }

/* -- Buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  border: 1px solid transparent; cursor: pointer;
}
.btn--primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
  color: #fff;
  box-shadow: 0 10px 30px rgba(143, 100, 37, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(143, 100, 37, 0.45); }
.btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.btn--wide { width: 100%; padding: 16px; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
  background: rgba(13, 21, 32, 0.15);
  backdrop-filter: saturate(160%) blur(8px);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
}
.site-header:not(.is-scrolled) .nav__menu a { color: #fff; }
.site-header:not(.is-scrolled) .nav__menu a:hover { color: var(--c-accent); }
.site-header:not(.is-scrolled) .lang-switch {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.site-header:not(.is-scrolled) .lang-btn { color: #fff; }
.site-header:not(.is-scrolled) .lang-btn:hover { background: rgba(255, 255, 255, 0.14); }
.site-header:not(.is-scrolled) .lang-btn.is-active { background: #fff; color: var(--c-ink); }
.site-header:not(.is-scrolled) .nav__toggle span { background: #fff; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; position: relative; }
.brand__logo { height: 72px; width: auto; display: block; transition: opacity 0.3s var(--ease), height 0.3s var(--ease); }
.brand__logo--light { position: relative; }
.brand__logo--dark {
  position: absolute; top: 0; left: 0; opacity: 0;
}
html[dir="rtl"] .brand__logo--dark { left: auto; right: 0; }
.site-header.is-scrolled .brand__logo--light { opacity: 0; }
.site-header.is-scrolled .brand__logo--dark { opacity: 1; }
.site-header.is-scrolled .brand__logo { height: 56px; }
@media (max-width: 900px) {
  .brand__logo { height: 60px; }
  .site-header.is-scrolled .brand__logo { height: 48px; }
}
@media (max-width: 600px) {
  .brand__logo { height: 48px; }
  .site-header.is-scrolled .brand__logo { height: 40px; }
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav__menu { display: flex; gap: 32px; align-items: center; }
.nav__menu a {
  font-weight: 500; font-size: 14.5px; color: var(--c-ink); position: relative;
  padding: 6px 0; transition: color 0.2s var(--ease);
}
.nav__menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--c-primary); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
html[dir="rtl"] .nav__menu a::after { transform-origin: right; }
.nav__menu a:hover { color: var(--c-primary); }
.nav__menu a:hover::after { transform: scaleX(1); }

/* Language switcher */
.lang-switch { display: inline-flex; gap: 6px; padding: 4px; background: var(--c-bg-2); border-radius: 999px; border: 1px solid var(--c-line); }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 6px; border: none; background: transparent; border-radius: 999px;
  color: var(--c-ink); font-weight: 600; font-size: 12px; letter-spacing: 0.06em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
html[dir="rtl"] .lang-btn { padding: 6px 6px 6px 10px; }
.lang-btn:hover { background: rgba(0, 0, 0, 0.04); }
.lang-btn.is-active { background: var(--c-ink); color: #fff; }
.flag {
  width: 20px; height: 14px; border-radius: 3px; overflow: hidden; display: inline-flex;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.flag svg { width: 100%; height: 100%; display: block; }

/* Mobile toggle */
.nav__toggle { display: none; background: transparent; border: 0; padding: 8px; }
.nav__toggle span {
  display: block; width: 22px; height: 2px; background: var(--c-ink); border-radius: 2px;
  margin: 4px 0; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

@media (max-width: 900px) {
  .nav__toggle { display: block; order: 2; }
  .lang-switch { order: 1; }
  .nav { gap: 8px; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-top: 1px solid var(--c-line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease);
  }
  .nav__menu.is-open { max-height: 400px; }
  .nav__menu li { border-bottom: 1px solid var(--c-line); }
  .nav__menu a { display: block; padding: 16px 24px; }
  .brand__sub { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh; padding-top: var(--header-h); position: relative; display: flex; align-items: center;
  color: #fff; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 700px at 15% 20%, rgba(231, 76, 60, 0.35), transparent 60%),
    radial-gradient(1000px 700px at 85% 80%, rgba(46, 204, 113, 0.28), transparent 55%),
    radial-gradient(900px 600px at 60% 40%, rgba(243, 156, 31, 0.22), transparent 60%),
    linear-gradient(160deg, #0d1520 0%, #1a2332 50%, #0d1520 100%);
}
.hero__blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.hero__blob--1 { top: -80px; left: -80px; width: 480px; height: 480px; background: var(--c-coral); animation-delay: 0s; }
.hero__blob--2 { bottom: -120px; right: -100px; width: 520px; height: 520px; background: var(--c-gold); animation-delay: -6s; }
.hero__blob--3 { top: 40%; left: 55%; width: 380px; height: 380px; background: var(--c-teal); animation-delay: -12s; opacity: 0.4; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
}
.hero__grain {
  position: absolute; inset: 0; opacity: 0.4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; padding: 120px 0 80px; }
.hero__copy { max-width: 780px; }
.hero__copy .eyebrow {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.hero__title {
  font-size: clamp(38px, 6vw, 74px);
  letter-spacing: -0.02em; line-height: 1.05;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #fff 40%, #d8c9a0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__subtitle {
  font-size: clamp(16px, 1.6vw, 20px); color: rgba(255, 255, 255, 0.82);
  max-width: 620px; margin-bottom: 36px;
}
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
}
.hero__scroll-line {
  display: block; width: 1px; height: 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
  animation: scrollHint 2.4s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(1); transform-origin: top; opacity: 0.6; }
  50% { transform: scaleY(0.4); transform-origin: bottom; opacity: 1; }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { background: var(--c-bg-2); }
.about__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 80px; align-items: center;
}
.about__copy .section__title { margin-bottom: 24px; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--c-line);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num {
  font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(30px, 3vw, 40px); color: var(--c-primary); line-height: 1;
}
html[lang="ar"] .stat__num { font-family: var(--f-arabic); }
.stat__label { font-size: 13px; color: var(--c-muted); letter-spacing: 0.04em; }

.about__visual { position: relative; }
.swatch-stack {
  position: relative; display: grid;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 140px);
  gap: 14px; transform: perspective(1200px) rotateY(-6deg) rotateX(4deg);
  filter: drop-shadow(0 30px 60px rgba(20, 25, 35, 0.2));
}
html[dir="rtl"] .swatch-stack { transform: perspective(1200px) rotateY(6deg) rotateX(4deg); }
.swatch {
  border-radius: var(--radius); position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 6px 18px rgba(0, 0, 0, 0.1);
}
.swatch::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 40%, rgba(0, 0, 0, 0.1));
}
.swatch--1 { background: linear-gradient(135deg, #d4a878, #8f6425); }
.swatch--2 { background: linear-gradient(135deg, #c8b6e6, #6b5b95); }
.swatch--3 { background: linear-gradient(135deg, #a8c9b8, #4a7d6b); }
.swatch--4 { background: linear-gradient(135deg, #e6c9a8, #b8863b); }
.swatch--5 { background: linear-gradient(135deg, #b8c8d8, #5a7a95); }
.swatch--6 { background: linear-gradient(135deg, #f0d9c0, #d4a878); }

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 50px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .swatch-stack { grid-template-rows: repeat(2, 100px); }
}

/* ==========================================================================
   FEATURES
   ========================================================================== */
.features { background: #fff; }
.features__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.feature {
  padding: 32px 26px; background: var(--c-bg-2); border-radius: var(--radius-lg);
  border: 1px solid var(--c-line); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.feature:hover {
  transform: translateY(-6px); box-shadow: var(--shadow);
  background: #fff;
}
.feature__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 20px;
}
.feature__title { font-size: 20px; margin-bottom: 10px; }
.feature__desc { color: var(--c-muted); font-size: 14.5px; margin: 0; }

@media (max-width: 1000px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   PRODUCTS
   ========================================================================== */
.products {
  background: linear-gradient(180deg, var(--c-bg-2) 0%, #fff 100%);
}
.products__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--c-line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-card__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-bg-3);
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__badge {
  position: absolute; top: 16px; left: 16px;
  padding: 6px 12px; background: rgba(13, 21, 32, 0.85); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 999px; backdrop-filter: blur(6px);
}
html[dir="rtl"] .product-card__badge { left: auto; right: 16px; }
.product-card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.product-card__name { font-size: 24px; margin-bottom: 6px; }
.product-card__tag {
  font-size: 13px; color: var(--c-primary); font-weight: 600;
  letter-spacing: 0.04em; margin-bottom: 14px;
}
.product-card__desc { color: var(--c-muted); font-size: 14.5px; flex: 1; margin-bottom: 20px; }
.product-card__cta {
  align-self: flex-start; font-weight: 600; color: var(--c-ink);
  border-bottom: 1px solid var(--c-primary); padding-bottom: 3px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.product-card__cta:hover { color: var(--c-primary); }
.product-card__cta .arrow { display: inline-block; transition: transform 0.25s var(--ease); }
html[dir="rtl"] .product-card__cta .arrow { transform: scaleX(-1); }
.product-card__cta:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .product-card__cta:hover .arrow { transform: scaleX(-1) translateX(4px); }

@media (max-width: 960px) { .products__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .products__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { background: var(--c-ink); color: #fff; }
.contact .section__title,
.contact .section__lead { color: #fff; }
.contact .section__lead { color: rgba(255, 255, 255, 0.78); }
.contact__grid {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start;
}
.contact__info { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.contact__info li { display: flex; flex-direction: column; gap: 6px; }
.contact__label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-accent); font-weight: 600;
}
.contact__value { color: rgba(255, 255, 255, 0.9); font-size: 15px; }

.contact__form {
  background: #fff; color: var(--c-ink); padding: 40px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--c-line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 15px;
  color: var(--c-ink); background: #fff;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
html[lang="ar"] .field input, html[lang="ar"] .field textarea { font-family: var(--f-arabic); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(184, 134, 59, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.field--split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.field--split > div { margin: 0; }

.form-status {
  margin-top: 14px; font-size: 14px; color: var(--c-primary);
  opacity: 0; transform: translateY(-4px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.form-status.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .contact__info { grid-template-columns: 1fr; }
  .contact__form { padding: 28px; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #060a10; color: rgba(255, 255, 255, 0.7);
  padding: 70px 0 24px;
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 50px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer__logo { height: 44px; width: auto; display: block; margin-bottom: 4px; }
.site-footer__brand p { margin-top: 16px; max-width: 340px; font-size: 14.5px; }
.site-footer h4 {
  font-family: var(--f-sans); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: #fff; margin-bottom: 18px; font-weight: 700;
}
html[lang="ar"] .site-footer h4 { font-family: var(--f-arabic); }
.site-footer__links li { margin-bottom: 10px; font-size: 14.5px; }
.site-footer__links a { transition: color 0.2s var(--ease); }
.site-footer__links a:hover { color: var(--c-accent); }
.site-footer__baseline {
  padding-top: 24px; font-size: 12.5px; color: rgba(255, 255, 255, 0.45); text-align: center;
}

@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ==========================================================================
   REVEAL ANIMATIONS
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   RTL — Arabic-specific tweaks
   ========================================================================== */
html[dir="rtl"] .hero__title { letter-spacing: 0; }
html[dir="rtl"] .brand { flex-direction: row-reverse; }
html[dir="rtl"] .brand__text { align-items: flex-end; }
html[dir="rtl"] .contact__form { text-align: right; }
html[dir="rtl"] .site-footer__brand p { margin-inline-start: 0; }
