/* Petroleox — corporate house style */

:root {
  --navy: #14314e;
  --navy-dark: #0c2236;
  --ink: #1f2a33;
  --steel: #5b6b78;
  --line: #ccd4da;
  --bg: #e7ebee;
  --panel: #ffffff;
  --brass: #9c7c4a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: Arial, "Helvetica Neue", Helvetica, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- the sheet: a bordered white page on a steel field ---------- */

.frame {
  max-width: 880px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  display: flex;
  flex-direction: column;
}

@media (min-width: 920px) {
  .frame {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    box-shadow: 0 1px 4px rgba(12, 34, 54, 0.12);
  }
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 1.75rem 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand .mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.names {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  direction: ltr;
  unicode-bidi: isolate;
}

.tagline {
  margin-top: 0.28rem;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
}

/* language switcher */

.langs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
}

.langs a {
  color: var(--steel);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.langs a:hover {
  color: var(--navy);
}

.langs a.current {
  color: var(--navy);
  font-weight: 700;
}

.langs span {
  color: var(--line);
}

/* ---------- primary navigation ---------- */

.mainnav {
  display: flex;
  flex-wrap: wrap;
  background: var(--navy);
}

.mainnav a {
  padding: 0.75rem 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #dfe6ec;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mainnav a:hover {
  background: var(--navy-dark);
  color: #fff;
}

.mainnav a.current {
  background: var(--navy-dark);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--brass);
}

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5rem) 1.75rem;
  border-bottom: 3px solid var(--brass);
  background-color: #0a1727;
  color: #e8eef4;
}

/* engraved petroleum scene, detail carried to the trailing edge */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("hero-engraving.jpg") center right / cover no-repeat;
  z-index: 0;
}

/* scrim keeps the headline legible over the artwork */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(8, 19, 33, 0.96) 0%,
    rgba(9, 23, 39, 0.82) 34%,
    rgba(10, 28, 46, 0.32) 64%,
    rgba(10, 28, 46, 0.04) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 33em;
}

.hero-kicker {
  margin-bottom: 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c8a164;
}

.hero-title {
  margin-bottom: 1.1rem;
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.01em;
  color: #f2f6fa;
}

.hero-lead {
  max-width: 34em;
  font-size: 1rem;
  line-height: 1.8;
  color: #c2cfdb;
}

.hero + .content {
  padding-top: 2.2rem;
}

/* ---------- content ---------- */

.content {
  flex: 1;
  padding: 2.4rem 1.75rem 2.8rem;
}

.kicker {
  margin-bottom: 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}

.content h1 {
  margin-bottom: 0.9rem;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--navy);
}

.lead {
  max-width: 46em;
  margin-bottom: 1.1rem;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink);
}

.content p {
  max-width: 46em;
  margin-bottom: 1rem;
  color: var(--steel);
}

.content p strong {
  color: var(--ink);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.8rem 0;
}

/* pillars (home) */

.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.8rem;
  list-style: none;
}

.pillars li {
  flex: 1 1 12em;
  padding-top: 0.7rem;
  border-top: 2px solid var(--navy);
}

.pillars b {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}

.pillars span {
  font-size: 0.86rem;
  color: var(--steel);
}

/* ledger (operations / company) */

.ledger {
  margin-top: 1.6rem;
  list-style: none;
}

.ledger li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.3rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.ledger li:first-child {
  border-top: 2px solid var(--navy);
}

.ledger .no {
  padding-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brass);
}

.ledger h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

.ledger p {
  grid-column: 2;
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--steel);
}

/* contact */

.contact-block {
  margin-top: 1.6rem;
  font-size: 0.95rem;
}

.contact-block dt {
  margin-bottom: 0.25rem;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
}

.contact-block dd {
  margin: 0 0 1.3rem;
  color: var(--ink);
}

.contact-block a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1rem;
}

.contact-block a:hover {
  border-bottom-color: var(--brass);
}

.content:has(.contact-visual) {
  display: flex;
  flex-direction: column;
}

.contact-visual {
  position: relative;
  height: clamp(10rem, 22vw, 13.5rem);
  margin-top: auto;
  margin-left: -1.75rem;
  margin-right: -1.75rem;
  margin-bottom: -2.8rem;
  border-top: 3px solid var(--brass);
  background: #0a1727 url("hero-seismic.jpg") center / cover no-repeat;
  overflow: hidden;
}

.contact-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(231, 235, 238, 0) 32%,
    rgba(10, 23, 39, 0.62) 100%);
}

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

.colophon {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding: 1.1rem 1.75rem 1.3rem;
  border-top: 1px solid var(--line);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.colophon .legal {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- arabic (rtl) ---------- */

[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, "Geeza Pro", "Noto Naskh Arabic", Arial, sans-serif;
  font-size: 15px;
}

[dir="rtl"] .mainnav a {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* letterspacing disconnects Arabic script; strip it from Arabic text runs */
[dir="rtl"] :is(.tagline, .kicker, .hero-kicker, .hero-title, .mainnav a, .ledger h2, .pillars b, .contact-block dt, .colophon) {
  letter-spacing: 0;
}

[dir="rtl"] .content h1 {
  font-size: 1.45rem;
  line-height: 1.5;
}

[dir="rtl"] .lead {
  font-size: 1.05rem;
  line-height: 1.95;
}

[dir="rtl"] .ledger h2 {
  font-size: 0.95rem;
}

[dir="rtl"] .ledger p,
[dir="rtl"] .pillars span {
  font-size: 0.98rem;
}

/* Latin language codes stay Latin-spaced even on RTL pages */
[dir="rtl"] .langs a {
  letter-spacing: 0.1em;
}

/* mirror the artwork and its scrim for RTL pages */
[dir="rtl"] .hero::before {
  transform: scaleX(-1);
}

[dir="rtl"] .hero::after {
  background: linear-gradient(270deg,
    rgba(8, 19, 33, 0.96) 0%,
    rgba(9, 23, 39, 0.82) 34%,
    rgba(10, 28, 46, 0.32) 64%,
    rgba(10, 28, 46, 0.04) 100%);
}

/* ---------- responsive ---------- */

@media (max-width: 540px) {
  .masthead {
    padding: 1.1rem 1.1rem 0.9rem;
  }

  .mainnav a {
    padding: 0.7rem 0.95rem;
  }

  .content {
    padding: 1.9rem 1.1rem 2.1rem;
  }

  .contact-visual {
    margin-left: -1.1rem;
    margin-right: -1.1rem;
    margin-bottom: -2.1rem;
  }

  .colophon {
    padding: 1rem 1.1rem 1.1rem;
  }

  .hero {
    padding: 2.4rem 1.1rem 2.6rem;
  }

  .hero::after {
    background: linear-gradient(90deg,
      rgba(8, 19, 33, 0.95) 0%,
      rgba(9, 23, 39, 0.88) 55%,
      rgba(10, 28, 46, 0.55) 100%);
  }

  [dir="rtl"] .hero::after {
    background: linear-gradient(270deg,
      rgba(8, 19, 33, 0.95) 0%,
      rgba(9, 23, 39, 0.88) 55%,
      rgba(10, 28, 46, 0.55) 100%);
  }
}
