/* Hakoura International Trading Group — site styles
   Brand kit v0.2: Navy/White hold the page, Sky structures, Gold once per screen. */

:root {
  --sky: #007DB4;
  --navy: #00263E;
  --granite: #4E738A;
  --stone: #A5BAC9;
  --white: #FFFFFF;
  --gold: #F5A800;

  --stone-tint: #EDF2F6;
  --navy-90: #0A3350;

  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'Poppins', sans-serif;

  --radius: 8px;
  --nav-h: 68px;
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
}

[dir="rtl"] body {
  font-family: var(--font-arabic);
  font-size: 17px;
  line-height: 1.85;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 600;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-family: var(--font-arabic);
  line-height: 1.4;
  letter-spacing: 0 !important;
}

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

a { color: var(--sky); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

[dir="rtl"] .label { letter-spacing: 0; font-family: var(--font-arabic); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s, box-shadow 0.2s;
}

[dir="rtl"] .btn { font-family: var(--font-arabic); }

.btn:active { transform: translateY(1px) scale(0.98); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover { background: #FFB81F; box-shadow: 0 6px 20px rgba(0, 38, 62, 0.25); }

.btn-sky {
  background: var(--sky);
  color: var(--white);
}

.btn-sky:hover { background: #0089c4; box-shadow: 0 6px 20px rgba(0, 38, 62, 0.35); }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--stone-tint);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo { display: flex; align-items: center; }

.nav-logo img { height: 40px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

[dir="rtl"] .nav-links a { font-family: var(--font-arabic); }

.nav-links a:hover { color: var(--sky); }

.nav-links a[aria-current="page"] {
  color: var(--sky);
  border-bottom-color: var(--sky);
}

.lang-toggle {
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  background: none;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin-block: 5px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero / page headers ---------- */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 88px 24px 120px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  min-height: min(720px, calc(100dvh - var(--nav-h)));
}

.hero-brandline {
  font-family: var(--font-arabic);
  font-size: 17px;
  color: var(--stone);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

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

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--stone);
  max-width: 34rem;
  margin-bottom: 36px;
}

[dir="rtl"] .hero-sub { line-height: 1.85; }

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(360px, 70%);
}

/* home hero over the port photo; the navy overlay keeps text contrast */
.hero-photo {
  background:
    linear-gradient(rgba(0, 38, 62, 0.86), rgba(0, 38, 62, 0.93)),
    url('../assets/hero-port.jpg') center / cover no-repeat;
}

.page-head .post-meta {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 16px;
}

[dir="rtl"] .page-head .post-meta { letter-spacing: 0; font-family: var(--font-arabic); }

/* post page: article + author sidebar */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}

.post-aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.author-card { display: flex; align-items: center; gap: 14px; }

.author-avatar { width: 48px; height: 48px; border-radius: 50%; }

.author-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--navy);
}

.author-role, .fact-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--granite);
}

.author-role { margin-top: 2px; }

.post-facts {
  border-top: 1px solid var(--stone);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-fact {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
}

[dir="rtl"] .author-name,
[dir="rtl"] .post-fact { font-family: var(--font-arabic); }

[dir="rtl"] .author-role,
[dir="rtl"] .fact-label { letter-spacing: 0; font-family: var(--font-arabic); }

.post .post-back { margin-top: 28px; }

.post .post-back .more {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--sky);
  text-decoration: none;
}

.post .post-back .more:hover { text-decoration: underline; }

[dir="rtl"] .post .post-back .more { font-family: var(--font-arabic); }

/* short header band for inner pages */
.page-head {
  position: relative;
  background: var(--navy);
  color: var(--white);
}

.page-head-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 72px 24px 96px;
}

.page-head h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-head p {
  font-size: 18px;
  color: var(--stone);
  max-width: 38rem;
}

/* the wake: brand divider stroke, cuts the navy into the next section */
.wake {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(14px, 2.2vw, 26px);
  display: block;
}

/* mirror the wake with the layout; the logo itself is never mirrored */
[dir="rtl"] .wake { transform: scaleX(-1); }

/* ---------- Sections ---------- */

.section { padding-block: 96px; }

.section-tint { background: var(--stone-tint); }

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  max-width: 26ch;
}

.section-lead {
  font-size: 18px;
  color: var(--granite);
  max-width: 60ch;
  margin-bottom: 56px;
}

/* ---------- The chain (3 columns) ---------- */

.chain {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-top: 56px;
}

.chain-col {
  padding-inline: 32px;
  border-inline-start: 1px solid var(--stone);
}

.chain-col:first-child { border-inline-start: none; padding-inline-start: 0; }

.chain-col h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.chain-col .label { color: var(--sky); display: block; margin-bottom: 16px; }

.chain-col p { color: var(--granite); font-size: 16px; }

.chain-note {
  margin-top: 56px;
  padding-inline-start: 20px;
  border-inline-start: 3px solid var(--sky);
  font-style: italic;
  font-size: 17px;
  color: var(--navy);
  max-width: 56ch;
}

[dir="rtl"] .chain-note { font-style: normal; font-weight: 500; }

/* ---------- Service rows ---------- */

.service-rows { margin-top: 24px; }

.service-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  padding-block: 48px;
  border-top: 1px solid var(--stone);
}

.service-row:first-child { border-top: none; }

.service-row h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

.service-row .service-benefit {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--sky);
  margin-top: 12px;
}

[dir="rtl"] .service-row .service-benefit { font-family: var(--font-arabic); }

.service-row p { color: var(--granite); font-size: 17px; }

/* compact teaser variant (home) */
.service-teaser a.more {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--sky);
}

.service-teaser a.more:hover { text-decoration: underline; }

[dir="rtl"] .service-teaser a.more { font-family: var(--font-arabic); }

/* ---------- Brand carousel ---------- */

.brand-marquee {
  overflow: hidden;
  margin-top: 56px;
  padding-block: 8px;
}

.brand-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: brand-scroll 30s linear infinite;
}

.brand-marquee:hover .brand-track { animation-play-state: paused; }

[dir="rtl"] .brand-track { animation-direction: reverse; }

@keyframes brand-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 8px)); }
}

.brand-tile {
  width: 240px;
  flex-shrink: 0;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--stone);
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  color: var(--navy);
  padding: 20px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}

.brand-tile:hover {
  transform: translateY(-4px);
  border-color: var(--sky);
  box-shadow: 0 14px 28px rgba(0, 38, 62, 0.12);
}

.brand-tile img {
  max-height: 88px;
  width: auto;
  max-width: 72%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-tile:hover img { transform: scale(1.05); }

/* ---------- Offices ---------- */

.office-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 56px;
}

.office-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 40px;
}

.office-card .label { color: var(--sky); display: block; margin-bottom: 14px; }

.office-card h3 { font-size: 24px; margin-bottom: 14px; }

.office-card p { color: var(--granite); font-size: 16px; }

/* ---------- Contact routes ---------- */

.route-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 56px;
}

.route-card {
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.route-card h3 { font-size: 24px; }

.route-card p { color: var(--granite); flex-grow: 1; }

/* ---------- Contact form ---------- */

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 760px;
}

.form-wide { grid-column: 1 / -1; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-pair {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
  align-items: start;
}

.hp { display: none !important; }

.form-field label {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
}

[dir="rtl"] .form-field label { font-family: var(--font-arabic); }

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
}

[dir="rtl"] .form-field input,
[dir="rtl"] .form-field select,
[dir="rtl"] .form-field textarea { font-family: var(--font-arabic); }

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--granite); opacity: 1; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
  border-color: var(--sky);
}

.form-field textarea { resize: vertical; min-height: 120px; }

.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea { border-color: #A4262C; }

.field-error { font-size: 14px; color: #A4262C; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-note {
  font-size: 14px;
  color: var(--granite);
  max-width: 46ch;
}

.form-success {
  background: rgba(0, 125, 180, 0.08);
  border-inline-start: 3px solid var(--sky);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--navy);
}

[dir="rtl"] .form-success { font-family: var(--font-arabic); }

.form-failure {
  background: rgba(164, 38, 44, 0.08);
  border-inline-start: 3px solid #A4262C;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--navy);
}

[dir="rtl"] .form-failure { font-family: var(--font-arabic); }

/* ---------- News cards / blog posts ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--navy);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}

.news-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 28px 28px;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--sky);
  box-shadow: 0 14px 28px rgba(0, 38, 62, 0.12);
}

.news-card .label { color: var(--sky); }

.news-card h3 { font-size: 20px; }

.news-card p { color: var(--granite); font-size: 15px; }

.post {
  max-width: 70ch;
  padding-block: 40px;
  border-top: 1px solid var(--stone);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.post-img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.post:first-child { border-top: none; padding-top: 0; }

.post .post-date { color: var(--sky); display: block; margin-bottom: 12px; }

.post h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }

.post p { color: var(--granite); font-size: 17px; margin-bottom: 14px; }

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

/* ---------- Closing CTA band ---------- */

.cta-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding-block: 96px;
}

.cta-band h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 32px;
  margin-inline: auto;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--navy);
  color: var(--stone);
  padding-block: 64px 40px;
  border-top: 1px solid var(--navy-90);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 48px;
}

.footer-brand img { width: 150px; }

.footer-brand .footer-line {
  margin-top: 18px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

[dir="rtl"] .footer-brand .footer-line { letter-spacing: 0; font-family: var(--font-arabic); }

.footer-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--stone);
  text-decoration: none;
}

[dir="rtl"] .footer-nav a { font-family: var(--font-arabic); }

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

.footer-meta { text-align: end; font-size: 14px; }

.footer-meta .cities { font-family: var(--font-heading); font-weight: 500; color: var(--white); margin-bottom: 8px; }

[dir="rtl"] .footer-meta .cities { font-family: var(--font-arabic); }

.footer-bottom {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(165, 186, 201, 0.2);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav-links a, .brand-tile, .brand-tile img, .news-card { transition: none; }
  .brand-tile:hover { transform: none; }
  .brand-tile:hover img { transform: none; }
  .news-card:hover { transform: none; }
  .brand-track { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; }
  .brand-tile.brand-dup { display: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    inset-inline: 0;
    background: var(--white);
    border-bottom: 1px solid var(--stone-tint);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding-block: 14px;
    font-size: 17px;
    border-bottom: none;
  }

  .nav-burger { display: block; }

  .nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 56px 24px 96px;
    gap: 40px;
    min-height: 0;
  }

  .hero-art { order: -1; }

  .hero-art img { width: min(200px, 48%); }

  .section { padding-block: 64px; }

  .chain { grid-template-columns: 1fr; gap: 40px; }

  .chain-col { border-inline-start: none; padding-inline: 0; }

  .service-row { grid-template-columns: 1fr; gap: 16px; padding-block: 36px; }

  .brand-tile { width: 200px; min-height: 108px; }

  .office-grid, .route-grid, .news-grid { grid-template-columns: 1fr; }

  .post-layout { grid-template-columns: 1fr; gap: 24px; }

  .post-aside { position: static; order: -1; }

  .contact-form { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .footer-nav { justify-content: flex-start; }

  .footer-meta { text-align: start; }
}
