/* =========================================================
   M Fardin Dubai Trading — Luxury corporate design system
   ========================================================= */

:root {
  --ink: #0c0b0a;
  --charcoal: #1c1916;
  --stone: #e8e2d8;
  --stone-dim: #c9c0b2;
  --gold: #c4a574;
  --gold-bright: #dbbf8f;
  --gold-light: #dbbf8f;
  --gold-dim: rgba(196, 165, 116, 0.35);
  --white: #f7f4ef;
  --muted: rgba(232, 226, 216, 0.68);
  --line: rgba(196, 165, 116, 0.22);
  --panel: rgba(10, 9, 8, 0.72);
  --panel-strong: rgba(10, 9, 8, 0.86);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 13rem;
  --header-logo-h: 12.25rem;
  --max: 72rem;
  --narrow: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--stone);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--white);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  color: var(--white);
  margin-bottom: 0.75rem;
}

p {
  margin: 0 0 1.1rem;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  color: var(--muted);
  font-weight: 300;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 1rem;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  padding: 0.5rem clamp(1rem, 4vw, 3rem) 0.25rem;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
}

.site-header.is-nav-open {
  background: #0c0b0a;
  border-bottom-color: transparent;
}

/* Logo styles live in css/logo.css */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 121;
  pointer-events: none;
}

.site-nav-cluster,
.site-nav .nav-cta {
  pointer-events: auto;
}

.site-nav-cluster {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(0.7rem, 1.2vw, 1.15rem);
  position: absolute;
  top: 50%;
  z-index: 121;
  transform: translateY(-50%);
}

.site-nav-cluster--left {
  right: 50%;
  margin-right: calc(var(--header-logo-h) * 0.52 + 0.85rem);
}

.site-nav-cluster--right {
  left: 50%;
  margin-left: calc(var(--header-logo-h) * 0.52 + 0.85rem);
}

.site-nav a {
  font-size: clamp(0.7rem, 0.85vw, 0.78rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-dim);
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.site-nav a:hover {
  color: var(--gold-bright);
}

.nav-cta {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 121;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold) !important;
}

.nav-cta:hover {
  border-color: var(--gold);
  background: rgba(196, 165, 116, 0.1);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 130;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.38rem auto;
  background: var(--stone);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(5.1px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-5.1px) rotate(-45deg);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--gold);
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn-ghost {
  border: 1px solid rgba(232, 226, 216, 0.28);
  color: var(--stone);
  background: rgba(10, 9, 8, 0.35);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ---------- Hero ---------- */

.hero {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  padding: calc(var(--header-h) + 1.75rem) clamp(1.25rem, 5vw, 4.5rem) 4rem;
}

.hero-inner {
  max-width: 44rem;
  animation: heroRise 1.2s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 4.75rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--white);
  margin: 0 0 1.5rem;
}

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.55;
  color: var(--gold-bright);
  margin: 0 0 1.25rem;
  max-width: 32rem;
}

.hero-lead {
  color: var(--muted);
  max-width: 30rem;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 5vw, 4.5rem);
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: var(--narrow);
}

/* ---------- About ---------- */

.about {
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.55) 0%, rgba(10, 9, 8, 0.82) 100%);
}

.about-vision {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.45;
}

/* ---------- Markets / Activities ---------- */

.activities {
  background: var(--panel-strong);
}

.markets {
  max-width: var(--max);
  margin: 3rem auto 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  padding: 0 clamp(1.25rem, 5vw, 4.5rem);
}

.markets--home {
  margin-top: 2rem;
}

.market {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(12rem, 20rem);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(2rem, 4vw, 2.75rem) 0;
  border-bottom: 1px solid var(--line);
}

.market-media {
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(10, 9, 8, 0.55);
}

.market-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}

.market:hover .market-media img {
  transform: scale(1.04);
}

.market-index {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold);
  line-height: 1;
  padding-top: 0.15rem;
}

.market-body p:not(.eyebrow) {
  color: var(--muted);
  max-width: 40rem;
}

.market-details {
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.market-details > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(196, 165, 116, 0.1);
}

.market-details > div:last-child {
  border-bottom: none;
}

.market-details dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.market-details dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--stone-dim);
  line-height: 1.55;
}

.market-details dd em {
  font-style: italic;
  color: var(--stone);
}

/* ---------- Presence ---------- */

.presence {
  background: var(--panel);
}

.presence-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

.presence-list li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.presence-list li:first-child {
  border-top: 1px solid var(--line);
}

.presence-country {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
}

.presence-role {
  font-size: 0.85rem;
  color: var(--stone-dim);
  text-align: right;
}

/* ---------- Contact ---------- */

.contact {
  background: var(--panel-strong);
}

.contact-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-block {
  margin-top: 2rem;
}

.contact-block-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 0.85rem;
}

.contact-company {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--white);
}

.office-list {
  margin: 0;
  padding: 0;
}

.office-list > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(196, 165, 116, 0.14);
}

.office-list dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.5;
}

.office-list dd {
  margin: 0;
  line-height: 1.55;
}

.office-list a:hover {
  color: var(--gold-bright);
}

.office-list--addresses > div {
  align-items: start;
}

.contact-form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1rem;
  padding: 2rem;
  border: 1px solid var(--line);
  background: rgba(10, 9, 8, 0.65);
  backdrop-filter: blur(12px);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form label.full {
  grid-column: 1 / -1;
}

.contact-form label span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-dim);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gold-dim);
  padding: 0.65rem 0;
  outline: none;
  transition: border-color 0.3s var(--ease);
  border-radius: 0;
  appearance: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--gold);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

.contact-form .btn {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.5rem;
  cursor: pointer;
}

.contact-form .btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
}

.form-status.is-success {
  color: var(--gold-bright);
}

.form-status.is-error {
  color: #e0a090;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2rem clamp(1.25rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
  background: rgba(10, 9, 8, 0.94);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
}

.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(201, 192, 178, 0.45);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.footer-cta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright, #d4b98a);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 165, 116, 0.4);
  padding-bottom: 0.12rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-cta:hover {
  color: #e8d5b0;
  border-color: rgba(232, 213, 176, 0.75);
}

.footer-cta--email {
  text-transform: none;
  letter-spacing: 0.02em;
}

.contact-email-line {
  margin: 0.25rem 0 1.35rem;
}

.contact-email-line a {
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.contact-email-line a:hover {
  color: #e8d5b0;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  :root {
    --header-h: 8.35rem;
    --header-logo-h: 7.5rem;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-content: stretch;
    padding: 0.4rem 0.85rem 0.4rem 1rem;
    z-index: 200;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    z-index: 200;
    border: 1px solid rgba(232, 226, 216, 0.55);
    background: rgba(10, 9, 8, 0.72);
    grid-column: 2;
    grid-row: 1;
  }

  .site-nav {
    display: none;
    pointer-events: auto;
    position: fixed;
    inset: 0;
    height: 100%;
    height: 100dvh;
    width: auto;
    z-index: 150;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: calc(var(--header-h) + 1.25rem) 1.5rem 2rem;
    background: #0c0b0a;
  }

  .site-nav-cluster {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    flex-direction: column;
    padding: 0;
    margin: 0;
    gap: 1.5rem;
  }

  .site-nav-cluster--left,
  .site-nav-cluster--right {
    margin: 0;
  }

  .site-nav.is-open {
    display: flex;
    pointer-events: auto;
  }

  .site-header.is-nav-open .logo {
    visibility: hidden;
    pointer-events: none;
  }

  .site-nav a {
    font-size: 1.05rem;
    letter-spacing: 0.16em;
  }

  .nav-cta {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    margin-top: 0.5rem;
    padding: 0.75rem 1.35rem;
  }
}

@media (max-width: 960px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .market {
    grid-template-columns: auto 1fr;
  }

  .market-media {
    grid-column: 1 / -1;
    max-width: 28rem;
  }

  .presence-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .presence-role {
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 6.85rem;
    --header-logo-h: 5.35rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .office-list > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .contact-block {
    margin-top: 1.75rem;
  }

  .market {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .market-media {
    max-width: none;
  }

  .market-details > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-inner {
    animation: none;
  }
}
