/* ============================================================
   GRAINOVA — Editorial luxury design system
   Deep green canvas · warm gold serif · multilingual (EN/AR/HE)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Greens */
  --green-950: #0b211a;
  --green-900: #0e2620;
  --green-850: #112c24;
  --green-800: #14342a;   /* primary deep green */
  --green-700: #1c3d32;
  --green-600: #265042;
  --green-500: #356455;

  /* Warm metals */
  --gold:        #c9a25e;
  --gold-bright: #ddbd83;
  --gold-deep:   #a9824a;
  --copper:      #b07a4a;

  /* Neutrals */
  --cream:    #faf8f3;
  --beige:    #f4f1ea;
  --beige-2:  #e9e4d8;
  --beige-3:  #ddd6c6;
  --sage:     #8a9a8f;
  --sage-dk:  #5f6f64;
  --charcoal: #262824;
  --ink:      #181b17;

  /* Semantic */
  --bg: var(--beige);
  --fg: var(--ink);

  /* Type families (swapped per language) */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Libre Franklin', system-ui, sans-serif;

  /* Rhythm */
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --section-y: clamp(72px, 9vw, 150px);

  --shadow-sm: 0 1px 2px rgba(11,33,26,.06), 0 8px 24px -16px rgba(11,33,26,.18);
  --shadow-md: 0 30px 70px -40px rgba(11,33,26,.45);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Language-specific font swaps */
html[lang="ar"] {
  --font-display: 'Amiri', 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
html[lang="he"] {
  --font-display: 'Frank Ruhl Libre', Georgia, serif;
  --font-body: 'Heebo', system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }

/* RTL adjustments: Arabic & Hebrew run larger visually */
html[dir="rtl"] body { font-size: 18px; line-height: 1.85; }
html[lang="ar"] .display-1, html[lang="ar"] .display-2 { line-height: 1.18; }
html[lang="he"] .display-1, html[lang="he"] .display-2 { line-height: 1.14; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.section { padding-block: var(--section-y); }
.section--green { background: var(--green-800); color: var(--beige); }
.section--green-950 { background: var(--green-950); color: var(--beige); }
.section--beige { background: var(--beige); color: var(--ink); }
.section--cream { background: var(--cream); color: var(--ink); }

/* ---------- Typography ---------- */
.display-1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.9rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.display-2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  line-height: 1.12;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  line-height: 1.2;
}
.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  line-height: 1.6;
  font-weight: 300;
  color: var(--sage-dk);
}
.section--green .lead, .section--green-950 .lead { color: #cdd6cd; }
.eyebrow {
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .8em;
}
html[dir="rtl"] .eyebrow { letter-spacing: .12em; }
.eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow--center::before { display: none; }
.serif-accent { font-family: var(--font-display); font-style: italic; font-weight: 500; }
.gold-text { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 1em 1.9em;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all .35s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
html[dir="rtl"] .btn { letter-spacing: .04em; }
.btn--gold { background: var(--gold); color: var(--green-900); }
.btn--gold:hover { background: var(--gold-bright); transform: translateY(-2px); }
.btn--ghost { border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold); }
.btn--ghost:hover { background: var(--gold); color: var(--green-900); }
.btn--dark { background: var(--green-800); color: var(--beige); }
.btn--dark:hover { background: var(--green-700); transform: translateY(-2px); }
.btn .arr { transition: transform .35s var(--ease); }
html[dir="rtl"] .btn .arr { transform: scaleX(-1); }
.btn:hover .arr { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arr { transform: scaleX(-1) translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  transition: gap .3s var(--ease);
}
.link-arrow:hover { gap: .95em; }
html[dir="rtl"] .link-arrow .arr { transform: scaleX(-1); }

/* ---------- Rules & dividers ---------- */
.rule { height: 1px; background: color-mix(in srgb, var(--gold) 45%, transparent); border: 0; }
.rule--soft { background: color-mix(in srgb, var(--ink) 12%, transparent); }

/* ---------- Image placeholders ---------- */
.ph {
  position: relative;
  background-color: var(--green-700);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(201,162,94,.10) 0 2px,
    transparent 2px 13px
  );
  border: 1px solid rgba(201,162,94,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: rgba(233,228,216,.62);
}
.ph--light {
  background-color: var(--beige-2);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(38,80,66,.07) 0 2px,
    transparent 2px 13px
  );
  border-color: rgba(38,80,66,.18);
  color: var(--sage-dk);
}
.ph__label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .5em 1em;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: color-mix(in srgb, var(--green-950) 28%, transparent);
  backdrop-filter: blur(2px);
}
.ph--light .ph__label { background: rgba(255,255,255,.5); }

/* ---------- Top navigation ---------- */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding .4s var(--ease);
}
.nav.is-solid {
  background: rgba(11,33,26,.93);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(201,162,94,.18);
}
.nav.is-solid .nav__inner { padding-block: 15px; }

/* Forced-solid (pages that open on a light section) — applied at first paint, no transition flash */
.nav[data-nav-solid] {
  background: rgba(11,33,26,.93);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(201,162,94,.18);
}

.wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--beige);
  white-space: nowrap;
}
html[dir="rtl"] .wordmark { letter-spacing: .12em; }
.wordmark .dot { color: var(--gold); }
.wordmark { direction: ltr; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
}
.nav__link {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(233,228,216,.82);
  padding: 6px 0;
  position: relative;
  transition: color .3s;
}
html[dir="rtl"] .nav__link { letter-spacing: .02em; font-size: .92rem; }
.nav__link::after {
  content: "";
  position: absolute;
  inset-block-end: 0; inset-inline-start: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .35s var(--ease);
}
.nav__link:hover { color: var(--beige); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: var(--gold); }

.nav__right { display: flex; align-items: center; gap: 22px; }

/* Language switch */
.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(201,162,94,.3);
  border-radius: 2px;
  overflow: hidden;
}
.lang__btn {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 7px 11px;
  color: rgba(233,228,216,.7);
  transition: all .25s;
  line-height: 1;
}
.lang__btn + .lang__btn { border-inline-start: 1px solid rgba(201,162,94,.2); }
.lang__btn:hover { color: var(--beige); }
.lang__btn.is-active { background: var(--gold); color: var(--green-900); }

.nav__menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--beige);
  background: var(--green-900);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media .ph { width: 100%; height: 100%; border: 0; align-items: flex-start; justify-content: flex-start; padding: clamp(80px,12vh,130px) var(--gutter); }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(11,33,26,.95) 0%, rgba(11,33,26,.55) 45%, rgba(11,33,26,.65) 100%);
}
.hero__scrim::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to var(--side-end, right), rgba(11,33,26,.7), transparent 60%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(60px, 9vh, 120px);
}
.hero__eyebrow { margin-bottom: 26px; }
.hero__title { max-width: 16ch; margin-bottom: 30px; }
.hero__sub { max-width: 52ch; margin-bottom: 40px; color: #d4dcd3; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  inset-block-end: 30px; inset-inline-end: var(--gutter);
  z-index: 3;
  display: flex; align-items: center; gap: 12px;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(201,162,94,.8);
  writing-mode: vertical-rl;
}
html[dir="rtl"] .scroll-cue { writing-mode: vertical-rl; }

/* ---------- Section header block ---------- */
.shead { max-width: 60ch; }
.shead--center { margin-inline: auto; text-align: center; }
.shead .eyebrow { margin-bottom: 22px; }
.shead .h2 { margin-bottom: 0; }
.shead__intro { margin-top: 22px; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(20px, 3vw, 48px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 100px);
  align-items: center;
}

/* ---------- Stat figures ---------- */
.stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 4.2vw, 3.8rem);
  line-height: 1;
  color: var(--gold);
}
.stat__label {
  margin-top: 12px;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage);
}
.section--beige .stat__label, .section--cream .stat__label { color: var(--sage-dk); }

/* ---------- Business unit cards (expandable) ---------- */
.unit {
  border-block-start: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  padding-block: 30px;
  cursor: pointer;
}
.section--green .unit, .section--green-950 .unit { border-block-start-color: rgba(201,162,94,.2); }
.unit__head {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 28px;
}
.unit__idx {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .8rem;
  color: var(--gold);
  letter-spacing: .1em;
}
.unit__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.1; }
.unit__toggle {
  width: 42px; height: 42px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold);
  transition: all .35s var(--ease);
  flex-shrink: 0;
}
.unit__toggle svg { transition: transform .4s var(--ease); }
.unit.is-open .unit__toggle { background: var(--gold); color: var(--green-900); }
.unit.is-open .unit__toggle svg { transform: rotate(45deg); }
.unit__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease), opacity .4s;
  opacity: 0;
}
.unit.is-open .unit__body { grid-template-rows: 1fr; opacity: 1; margin-top: 22px; }
.unit__body-inner { overflow: hidden; }
.unit__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 70px);
  padding-inline-start: 84px;
}
.unit__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tag {
  font-size: .76rem;
  letter-spacing: .04em;
  padding: .45em 1em;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: 2px;
  color: var(--gold);
}

/* ---------- Generic editorial card ---------- */
.card {
  background: var(--cream);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card__media { aspect-ratio: 4 / 3; }
.card__body { padding: 28px 30px 34px; }
.card__kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; }
.card__title { margin-bottom: 12px; }

/* ---------- Featured brand block ---------- */
.feature-brand {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 560px;
}
.feature-brand__media { position: relative; }
.feature-brand__media .ph { position: absolute; inset: 0; }
.feature-brand__content {
  background: var(--green-950);
  color: var(--beige);
  padding: clamp(40px, 6vw, 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer { background: var(--green-950); color: #c4cdc3; padding-block: clamp(60px, 8vw, 110px) 40px; }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 5vw, 70px);
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(201,162,94,.16);
}
.footer__brand .wordmark { font-size: 1.3rem; margin-bottom: 22px; display: inline-block; }
.footer__tag { max-width: 34ch; color: #9fb0a3; font-weight: 300; }
.footer__col h4 {
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px; font-weight: 600;
}
.footer__col a { display: block; padding: 7px 0; color: #b7c2b8; transition: color .25s; font-size: .95rem; }
.footer__col a:hover { color: var(--beige); }
.footer__bottom {
  padding-top: 30px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: .8rem; color: #7d8d82;
}
.footer__bottom a:hover { color: var(--gold); }

/* ---------- Newsletter input ---------- */
.subscribe { display: flex; border: 1px solid rgba(201,162,94,.35); border-radius: 2px; overflow: hidden; max-width: 340px; }
.subscribe input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 12px 16px; color: var(--beige); font: inherit; font-size: .9rem;
}
.subscribe input::placeholder { color: #8295899c; }
.subscribe button { background: var(--gold); color: var(--green-900); padding: 0 18px; font-size: 1.1rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.mb-s { margin-bottom: 16px; } .mb-m { margin-bottom: 28px; } .mb-l { margin-bottom: 48px; }
.maxw-50 { max-width: 52ch; } .maxw-60 { max-width: 62ch; }
.hide { display: none !important; }

/* ---------- Page-intro (sub-page hero) ---------- */
.pintro {
  background: var(--green-900);
  color: var(--beige);
  padding-block: clamp(150px, 20vh, 230px) clamp(60px, 8vw, 110px);
  position: relative;
  overflow: hidden;
}
.pintro__media { position: absolute; inset: 0; opacity: .26; }
.pintro__media .ph { width: 100%; height: 100%; border: 0; }
.pintro__inner { position: relative; z-index: 2; }
.pintro .display-2 { max-width: 18ch; margin-top: 22px; }
.pintro .lead { max-width: 56ch; margin-top: 24px; }

/* breadcrumb */
.crumb { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); display: flex; gap: 10px; align-items: center; }
.crumb a:hover { color: var(--gold); }
.crumb .sep { color: rgba(201,162,94,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .feature-brand, .footer__top { grid-template-columns: 1fr; }
  .feature-brand__media { min-height: 360px; }
  .nav__links { display: none; }
  .nav__menu-btn { display: grid; place-items: center; width: 42px; height: 42px; color: var(--beige); border: 1px solid rgba(201,162,94,.3); border-radius: 2px; }
  .unit__cols { padding-inline-start: 0; grid-template-columns: 1fr; }
  .footer__top { gap: 40px; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .unit__head { grid-template-columns: 40px 1fr auto; gap: 16px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
}
