/* Reset, elements, and the shared component vocabulary.
   Page-specific composition lives in layout.css. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--green-soft);
  font-family: var(--ui);
  font-weight: 300;
  font-size: var(--body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* sections break the grid deliberately; never scroll sideways */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; transition: color var(--t-hover) ease; }
a:hover { color: var(--brass-deep); }

:focus-visible { outline: 1px solid var(--brass); outline-offset: 2px; }

button { font: inherit; color: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  background: var(--green);
  color: var(--ivory);
  padding: 12px 18px;
  font-size: var(--meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- type ---- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 300;
  color: var(--green);
  margin: 0;
  text-wrap: pretty;
}

.h-hero { font-size: var(--h1-hero); line-height: 1.03; letter-spacing: 0.01em; }
.h-page { font-size: var(--h1-page); line-height: 1.02; letter-spacing: 0.01em; }
.h-sec  { font-size: var(--h2);      line-height: 1.06; }
.h-sub  { font-size: var(--h3);      line-height: 1.1; }

/* The brand signature: second line italic in brass. */
em, .em { font-style: italic; color: var(--brass); }
.on-green em, .on-green .em { color: var(--brass-light); }

.eyebrow {
  font-family: var(--ui);
  font-size: var(--meta);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.on-green .eyebrow { color: var(--paper-55); }

.meta {
  font-family: var(--ui);
  font-size: var(--meta);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-72);
}
.on-green .meta { color: var(--paper-55); }

.lede { font-size: var(--lede); line-height: 1.65; color: var(--ink-66); max-width: 46ch; }
.on-green .lede { color: var(--paper-70); }

.body  { max-width: 66ch; color: var(--ink-78); line-height: 1.85; }
.on-green .body { color: var(--paper-80); }

.numeral { font-family: var(--display); font-weight: 300; color: var(--brass); line-height: 1; }
.on-green .numeral { color: var(--brass-light); }

/* Deep-green ground. Sections opt in; everything inside inherits the inverted
   tier system through the .on-green descendant rules above. */
.on-green { background: var(--green); color: var(--paper-80); }
.on-green h1, .on-green h2, .on-green h3 { color: var(--ivory); }
.on-green a { color: var(--brass-light); }
.on-green a:hover { color: var(--ivory); }

/* ------------------------------------------------------------- buttons ---- */
/* All three variants are a 420ms background-position wipe. Nothing scales. */

.btn {
  display: inline-block;
  font-family: var(--ui);
  font-size: var(--btn);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;      /* labels wrapped during testing */
  padding: 19px 34px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  background-size: 200% 100%;
  background-position: 100% 0;
  transition: background-position var(--t-wipe) var(--ease-wipe),
              color var(--t-hover) ease,
              border-color var(--t-hover) ease;
}
.btn:hover, .btn:focus-visible { background-position: 0 0; }

.btn--primary {
  color: var(--ivory);
  background-image: linear-gradient(to right, var(--brass) 50%, var(--green) 50%);
}
.btn--primary:hover { color: var(--ivory); }

.btn--secondary {
  color: var(--green);
  border: 1px solid var(--ink-40);
  background-image: linear-gradient(to right, var(--green) 50%, transparent 50%);
}
.btn--secondary:hover { color: var(--ivory); border-color: var(--green); }

.btn--outline {
  color: var(--ivory);
  border: 1px solid var(--paper-40);
  background-image: linear-gradient(to right, var(--ivory) 50%, transparent 50%);
}
.btn--outline:hover { color: var(--green); border-color: var(--ivory); }

/* Tertiary action is a text link, never a button. */
.link-arrow {
  font-family: var(--ui);
  font-size: var(--btn);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-deep);
  border-bottom: 1px solid rgba(107, 88, 54, 0.4);
  padding-bottom: 7px;
}
.link-arrow:hover { color: var(--brass); border-bottom-color: var(--brass); }
.on-green .link-arrow { color: var(--brass-light); border-bottom-color: rgba(201, 168, 106, 0.4); }

/* ----------------------------------------------------------- wordmark ----- */

.wordmark { display: inline-flex; align-items: baseline; gap: 7px; }
.wordmark__first {
  font-family: var(--wordmark);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--green);
}
.wordmark__last {
  font-family: var(--display);
  font-weight: 600;
  font-style: italic;
  color: var(--brass);
}
.on-green .wordmark__first { color: var(--ivory); }
.on-green .wordmark__last  { color: var(--brass-light); }

/* ---------------------------------------------------------------- nav ----- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ivory);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.nav.is-scrolled { border-bottom-color: var(--ink-14); }


.nav__inner {
  max-width: var(--measure);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav .wordmark__first, .nav .wordmark__last { font-size: 25px; }

.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__link {
  font-size: var(--meta);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-62);
  border-bottom: 1px solid transparent;
  padding-bottom: 6px;
}
.nav__link:hover { color: var(--green); }
.nav__link.is-active { color: var(--green); border-bottom-color: var(--brass); }

.nav__divider { width: 1px; height: 16px; background: var(--ink-16); }
.nav__lang { font-family: var(--arabic); font-size: 12px; color: var(--ink-62); }

.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: var(--meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}
.nav__toggle-bar { display: inline-block; width: 22px; height: 1px; background: var(--green); }

@media (max-width: 1023px) {
  .nav__links  { display: none; }
  .nav__toggle { display: flex; }
}

/* ------------------------------------------------------------ overlay ----- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--green);
  opacity: 0;
  overflow-y: auto;
  transition: opacity var(--t-accord) ease;
}
.overlay.is-open { opacity: 1; }
body.nav-open { overflow: hidden; }

.overlay__inner { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.overlay__head {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.overlay .wordmark__first, .overlay .wordmark__last { font-size: 25px; }
.overlay__close {
  min-height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: var(--meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-70);
}
.overlay__close:hover { color: var(--ivory); }

.overlay__nav { margin-top: clamp(20px, 5vh, 48px); }
.overlay__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--paper-14);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-fade) ease-out, transform var(--t-fade) ease-out;
}
.overlay__link.is-in { opacity: 1; transform: none; }
.overlay__link-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(34px, 9vw, 42px);
  line-height: 1.1;
  color: var(--ivory);
}
.overlay__link:hover .overlay__link-name { color: var(--brass-light); }
.overlay__link-index { font-size: var(--meta); letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-45); }

.overlay__foot {
  margin-top: clamp(32px, 6vh, 56px);
  padding-bottom: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
}

/* ---------------------------------------------------------- accordion ----- */

.faq__item { border-bottom: 1px solid var(--ink-14); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
  min-height: 44px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--green);
  transition: color var(--t-hover) ease;
}
.faq__item.is-open .faq__q { color: var(--brass); }
.faq__q-text {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
}
.faq__plus {
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  color: var(--brass);
  transition: transform var(--t-accord) ease;
  /* the glyph rotates 45°, so its corners swing past its own box — without a
     little inset that overhang pushes the page sideways at 320px */
  margin-right: 4px;
}

/* Belt and braces: clip any residual rotation overhang at the row rather than
   letting it widen the document. */
.faq__q { overflow: hidden; }
.faq__item.is-open .faq__plus { transform: rotate(45deg); }

/* Height is set inline by site.js from the measured content, not a fixed cap —
   the prototype's 320px ceiling silently clipped longer answers. */
.faq__body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--t-accord) ease, opacity var(--t-hover) ease;
}
.faq__item.is-open .faq__body { opacity: 1; }
.faq__body p { font-size: var(--body); line-height: 1.85; max-width: 60ch; margin: 0 0 28px; }

/* -------------------------------------------------------- testimonials ---- */

.quotes { position: relative; flex: 1 1 520px; max-width: 780px; min-height: 280px; }
.quote {
  transition: opacity var(--t-fade) ease;
}
.quote + .quote { position: absolute; inset: 0; }
.quote__text {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: var(--quote);
  line-height: 1.36;
  color: var(--green);
  max-width: 30ch;
  margin: 0;
}

.dots { display: flex; gap: 9px; margin-top: 30px; }
.dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;          /* one of only two radius exceptions */
  cursor: pointer;
  background: var(--ink-25);
  transition: background-color var(--t-hover) ease;
}
.dot.is-active { background: var(--brass); }

/* ------------------------------------------------------------- fields ----- */
/* Underline-only. Textareas are the one exception and take a full border. */

.field { display: block; }
.field__label {
  display: block;
  font-size: var(--meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-72);
  margin-bottom: 10px;
}
.field__input,
.field__select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink-30);
  border-radius: var(--radius);
  padding: 10px 0;
  font-family: var(--ui);
  font-size: var(--body);
  font-weight: 300;
  color: var(--green);
  transition: border-color var(--t-hover) ease;
}
.field__textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--ink-30);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--ui);
  font-size: var(--body);
  font-weight: 300;
  line-height: 1.8;
  color: var(--green);
  resize: vertical;
  transition: border-color var(--t-hover) ease;
}
.field__input:focus,
.field__select:focus,
.field__textarea:focus { outline: none; border-color: var(--brass); }

/* -------------------------------------------------------------- motion ---- */

[data-hero], [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-reveal) ease-out, transform var(--t-reveal) ease-out;
}
[data-hero].is-in, [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-hero], [data-reveal] { opacity: 1 !important; transform: none !important; }
}
