:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #14292b;
  --muted: #56615f;
  --line: #e6dfd3;
  --teal: #0f5c63;
  --teal-dark: #0b3f44;
  --accent: #a85a17;
  --accent-light: #f0b45e;
  --on-dark: #d9e6e6;
  --radius: 8px;
  --wrap: 72rem;
  --latin: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

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

/* Latin glyphs come from IBM Plex Sans, Arabic glyphs fall through to IBM Plex Sans Arabic */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[dir="rtl"] body {
  line-height: 1.85;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 700;
}

:root[dir="rtl"] :is(h1, h2, h3) {
  line-height: 1.45;
}

a {
  color: var(--teal);
  text-underline-offset: 0.2em;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1rem;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius);
}

.skip:focus {
  top: 1rem;
}

/* Wordmark: "Phron" in teal, "oma" (Oman) in the accent */
.wordmark {
  font-family: var(--latin);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}

.oma {
  color: var(--accent);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.site-header .wordmark {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 1.625rem;
  line-height: 1.2;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 1.125rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.lang:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* Hero */
.hero {
  padding-block: 3.5rem 4.5rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.hero h1 {
  max-width: 19ch;
  font-size: clamp(2.125rem, 1.25rem + 4vw, 4.25rem);
  line-height: 1.15;
}

:root[dir="ltr"] .hero h1 {
  letter-spacing: -0.02em;
}

:root[dir="rtl"] .hero h1 {
  line-height: 1.4;
}

.lead {
  max-width: 40rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 2.25rem;
  padding: 0.75rem 1.75rem;
  background: var(--teal);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}

.btn:hover {
  background: var(--teal-dark);
}

/* Sections */
.section {
  padding-block: 4rem;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section h2 {
  color: var(--teal-dark);
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}

.intro {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Name story: the equation stays left-to-right on both pages so it spells the word */
.name-parts {
  display: grid;
  gap: 1rem;
}

.part {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.part-word {
  font-family: var(--latin);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1;
  color: var(--teal);
}

.part-word.oma {
  color: var(--accent);
}

.part-origin {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.part p:last-child {
  margin-top: 1rem;
}

.plus {
  justify-self: center;
  align-self: center;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 2rem;
  line-height: 1;
}

.motto {
  max-width: 44rem;
  margin-top: 3rem;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--accent);
  color: var(--teal);
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2.125rem);
  font-weight: 500;
  line-height: 1.5;
}

/* Products */
.products {
  display: grid;
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-kind {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}

.card h3 {
  margin-top: -0.5rem;
  color: var(--teal-dark);
  font-size: 1.5rem;
}

.card h3 .alt {
  margin-inline-start: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
}

.card ul {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card li {
  position: relative;
  padding-inline-start: 1.25rem;
}

.card li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.7em;
  top: calc(0.5lh - 3px);
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 1px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
}

/* Value above its label; markup keeps label first for screen readers */
.stats div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}

.stats dd {
  margin: 0;
  color: var(--teal);
  font-family: var(--latin);
  font-size: clamp(1.375rem, 1rem + 1.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.stats dt {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Why us */
.reasons {
  display: grid;
  gap: 2rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reason;
}

.reasons li {
  padding-top: 1.25rem;
  border-top: 2px solid var(--teal);
}

.reasons li::before {
  counter-increment: reason;
  content: counter(reason, decimal-leading-zero);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-family: var(--latin);
  font-size: 0.9375rem;
  font-weight: 700;
}

.reasons h3 {
  margin-bottom: 0.5rem;
  color: var(--teal-dark);
  font-size: 1.25rem;
}

.reasons p {
  color: var(--muted);
}

/* Contact */
.email {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--latin);
  font-size: clamp(1.375rem, 1rem + 3vw, 2.5rem);
  font-weight: 700;
  text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  padding-block: 2.5rem;
  background: var(--teal-dark);
  color: var(--on-dark);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer .wordmark {
  color: #fff;
  font-size: 1.375rem;
}

.site-footer .oma {
  color: var(--accent-light);
}

.site-footer :focus-visible {
  outline-color: var(--accent-light);
}

.legal > span {
  display: block;
}

.nowrap {
  white-space: nowrap;
}

/* 404 */
.notfound {
  padding-block: 5rem;
}

.notfound h1 {
  color: var(--teal-dark);
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}

.notfound p + p {
  margin-top: 0.75rem;
}

@media (min-width: 40em) {
  .wrap {
    padding-inline: 1.5rem;
  }

  .reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 48em) {
  .hero {
    padding-block: 6rem 7rem;
  }

  .section {
    padding-block: 6rem;
  }

  .name-parts {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1.5rem;
  }

  .card {
    padding: 2.25rem;
  }
}

@media (min-width: 52em) {
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .reasons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a {
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
  }
}
