/* APEX SOFT — brand palette drawn from the logo: deep pine green + amber, warm sand */
:root {
  --pine: #2C4A3E;
  --pine-deep: #233B32;
  --amber: #D08A33;
  --amber-soft: #E8B46B;
  --clay: #A64B2A;
  --sand: #EFE4D1;
  --paper: #FAF6EE;
  --ink: #1F2A24;
  --ink-soft: #55615A;
  --cream: #F6F1E6;
  --line: #DCCFB8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Readex Pro', 'Noto Kufi Arabic', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
}
body.latin { font-family: 'Archivo', system-ui, sans-serif; line-height: 1.65; }

h1, h2, h3 { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 1.5; }
body.latin h1, body.latin h2 { font-family: 'Fraunces', serif; line-height: 1.15; }
body.latin h3 { font-family: 'Archivo', sans-serif; }

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- header ---------- */
.top {
  position: absolute; inset-block-start: 0; inset-inline: 0; z-index: 5;
  display: flex; align-items: center; gap: 28px;
  padding: 22px clamp(20px, 5vw, 64px);
  color: var(--cream);
}
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .06em; font-family: 'Archivo', sans-serif; }
.top-nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: 15px; }
.top-nav a { opacity: .82; }
.top-nav a:hover { opacity: 1; border-block-end: 2px solid var(--amber); }
.langs { display: flex; gap: 4px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; }
.langs button {
  border: 0; background: none; color: var(--cream); cursor: pointer;
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-family: inherit;
}
.langs button.active { background: var(--amber); color: var(--pine-deep); font-weight: 600; }
.langs button:focus-visible, .btn:focus-visible, .top-nav a:focus-visible { outline: 2px solid var(--amber-soft); outline-offset: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--pine) 0%, var(--pine-deep) 100%);
  color: var(--cream);
  padding: clamp(130px, 18vh, 190px) clamp(20px, 5vw, 64px) clamp(70px, 10vh, 120px);
}
.hero-knot {
  position: absolute; inset-block-start: 50%; inset-inline-end: -12%;
  width: min(62vh, 560px); transform: translateY(-50%) rotate(8deg);
  opacity: .1; pointer-events: none;
}
.hero-inner { position: relative; max-width: 780px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 600; }
body.latin .hero h1 { font-weight: 500; }
.hl { color: var(--amber); }
.hl2 { color: var(--amber-soft); }
body.latin .hl, body.latin .hl2 { font-style: italic; }
.hero-sub { margin-block-start: 22px; max-width: 640px; font-size: 18px; font-weight: 300; opacity: .92; }
body.latin .hero-sub { font-weight: 400; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 10px; font-size: 16px; font-weight: 600;
}
.btn-amber { background: var(--amber); color: var(--pine-deep); }
.btn-amber:hover { background: var(--amber-soft); }
.btn-ghost { border: 1.5px solid rgba(246,241,230,.45); color: var(--cream); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-soft); }

/* ---------- sections ---------- */
section { padding: clamp(56px, 9vh, 110px) clamp(20px, 5vw, 64px); }
.section-head { max-width: 720px; margin-block-end: 48px; }
.section-head .star { width: 30px; height: 30px; margin-block-end: 16px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); color: var(--pine); }
.section-head p { color: var(--ink-soft); margin-block-start: 10px; }

/* services */
.services { background: var(--sand); }
.service-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 40px clamp(28px, 4vw, 64px); max-width: 1100px;
}
.service { border-block-start: 1px solid var(--line); padding-block-start: 22px; }
.service-star { width: 20px; height: 20px; margin-block-end: 12px; opacity: .85; }
.service h3 { font-size: 19px; color: var(--pine); }
.service p { color: var(--ink-soft); font-size: 15.5px; margin-block-start: 6px; }

/* why */
.why { background: var(--paper); }
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 36px; max-width: 1100px;
}
.why-item h3 { font-size: 20px; color: var(--clay); }
body.latin .why-item h3 { font-family: 'Fraunces', serif; font-style: italic; font-weight: 600; }
.why-item p { color: var(--ink-soft); font-size: 15.5px; margin-block-start: 8px; }

/* portfolio */
.work { background: var(--cream); }
.work-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px; max-width: 1180px;
}
.plaque {
  background: #FFFDF8; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
}
.plaque-logo { height: 76px; display: flex; align-items: center; margin-block-end: 6px; }
.plaque-logo img { max-height: 76px; max-width: 160px; object-fit: contain; }
.plaque-placeholder { opacity: .25; width: 56px; }
.plaque h3 { font-size: 18px; color: var(--pine); }
.plaque-meta { font-size: 14px; color: var(--ink-soft); }
.plaque-desc { font-size: 14.5px; color: var(--ink-soft); }
.chip {
  align-self: flex-start; margin-block-start: 6px;
  background: rgba(208,138,51,.14); color: var(--clay);
  font-size: 12.5px; font-weight: 600; padding: 3px 12px; border-radius: 999px;
}
.work-empty { color: var(--ink-soft); }

/* contact */
.contact {
  position: relative; overflow: hidden;
  background: linear-gradient(200deg, var(--pine) 0%, var(--pine-deep) 100%);
  color: var(--cream);
}
.contact-knot {
  position: absolute; inset-block-end: -30%; inset-inline-start: -8%;
  width: 420px; opacity: .08; pointer-events: none;
}
.contact-inner { position: relative; max-width: 780px; }
.contact h2 { font-size: clamp(28px, 3.8vw, 44px); }
.contact p { margin-block-start: 12px; opacity: .9; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 30px; }
.contact-place { font-size: 15px; opacity: .75; margin-block-start: 26px; }

/* footer */
.foot {
  background: var(--pine-deep); color: var(--cream);
  padding: 42px clamp(20px, 5vw, 64px) 34px;
  display: flex; flex-direction: column; gap: 10px;
}
.foot-logo { width: 200px; }
.foot p { font-size: 14px; opacity: .75; }
.foot-copy { font-size: 13px; opacity: .5; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .top { flex-wrap: wrap; gap: 12px; }
  .top-nav { display: none; }
  .langs { margin-inline-start: auto; }
  .hero { padding-block-start: 110px; }
  .hero-knot { inset-inline-end: -45%; opacity: .07; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .contact-actions .btn { width: 100%; justify-content: center; }
}
