/* Sheettally - base styles
   Palette, typography, layout, header, footer. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #18864a;
  --green-dark: #12683a;
  --green-light: #eaf5ee;
  --text: #17231d;
  --secondary: #59665f;
  --white: #ffffff;
  --section-bg: #f5f8f6;
  --border: #dce5df;
  --muted-bg: #eef2ef;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(23, 35, 29, 0.06);
  --shadow-md: 0 1px 2px rgba(23, 35, 29, 0.05), 0 10px 26px rgba(23, 35, 29, 0.07);

  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.35rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.35vw, 2.2rem);
}

h3 {
  font-size: 1.19rem;
}

h4 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--green);
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.15em;
}

li {
  margin-bottom: 0.45em;
}

strong {
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

::selection {
  background: var(--green-light);
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- layout ---------- */

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

.container-narrow {
  max-width: 820px;
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 44px 0;
}

.section-alt {
  background: var(--section-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  color: var(--secondary);
  font-size: 1.05rem;
}

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.12rem;
  color: var(--secondary);
}

.stack-sm > * + * {
  margin-top: 10px;
}

.text-muted {
  color: var(--secondary);
}

.small {
  font-size: 0.88rem;
}

.center {
  text-align: center;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease-in;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-name span {
  color: var(--green);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.site-nav a {
  display: inline-block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--muted-bg);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--green-dark);
  font-weight: 600;
  background: var(--green-light);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.icon-link:hover {
  background: var(--muted-bg);
  color: var(--text);
}

.icon-link svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 12px 0 20px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  margin: 0;
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--muted-bg);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.mobile-nav a:hover {
  color: var(--green-dark);
}

.mobile-nav .btn {
  margin-top: 18px;
  width: 100%;
}

/* ---------- footer ---------- */

.site-footer {
  background: #10241b;
  color: #cfded5;
  padding: 60px 0 28px;
  font-size: 0.95rem;
}

.site-footer a {
  color: #cfded5;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .brand {
  color: var(--white);
  margin-bottom: 14px;
}

.footer-brand .brand:hover {
  color: var(--white);
}

.footer-brand .brand-name span {
  color: #6fd39b;
}

.footer-brand p {
  color: #a9bdb2;
  max-width: 32ch;
  font-size: 0.93rem;
}

.footer-col .footer-heading {
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 14px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 2px;
}

.footer-col a {
  display: inline-block;
  padding: 8px 0;
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  color: #9db3a8;
  font-size: 0.86rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- arabic text ---------- */

[dir="rtl"],
.lang-ar {
  font-family: var(--font-ar);
}

.lang-ar {
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
