/* =========================================================
   معدن آمور — Cosentino-inspired architectural surfaces theme
   ========================================================= */

:root {
  --bg: #f5f4f2;
  --bg-soft: #ebe9e6;
  --surface: #ffffff;
  --ink: #141414;
  --ink-soft: #3d3d3d;
  --muted: #6f6b66;
  --line: rgba(20, 20, 20, 0.12);
  --accent: #1f3a34;
  --accent-soft: #2f564c;
  --brass: #b08d57;
  --dark: #0e1110;
  --dark-soft: #1a211f;
  --radius: 2px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-fa: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font-brand: "Syne", "IBM Plex Sans Arabic", sans-serif;
  --max: 1280px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-fa);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  font-weight: 600;
}

p {
  margin: 0;
}

.site {
  overflow-x: clip;
}

.container {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - (var(--pad) * 2), 1440px);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(245, 244, 242, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.is-scrolled .brand-mark,
.site-header.is-solid .brand-mark,
.site-header.is-scrolled .nav-link,
.site-header.is-solid .nav-link,
.site-header.is-scrolled .menu-toggle span,
.site-header.is-solid .menu-toggle span {
  color: var(--ink);
  background-color: var(--ink);
}

.site-header.is-scrolled .nav-link,
.site-header.is-solid .nav-link {
  background-color: transparent;
}

.header-inner {
  width: min(100% - (var(--pad) * 2), 1440px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  z-index: 2;
}

.brand-mark {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  transition: color 0.3s var(--ease);
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.3s var(--ease);
}

.site-header.is-scrolled .brand-sub,
.site-header.is-solid .brand-sub {
  color: var(--muted);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.35rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  background: var(--accent);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.header-cta:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: 5px auto;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--dark);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}

/* ---------- Hero (full-bleed) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: #fff;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: hero-zoom 18s var(--ease) infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 11, 0.35) 0%, rgba(8, 12, 11, 0.15) 35%, rgba(8, 12, 11, 0.72) 100%),
    linear-gradient(90deg, rgba(8, 12, 11, 0.25), transparent 55%);
}

.hero-content {
  width: min(100% - (var(--pad) * 2), 1440px);
  margin-inline: auto;
  padding-bottom: clamp(3.5rem, 8vh, 6.5rem);
  padding-top: calc(var(--header-h) + 2rem);
  max-width: 760px;
  margin-right: auto;
  margin-left: var(--pad);
}

.hero-brand {
  font-family: var(--font-brand);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1s var(--ease) 0.15s forwards;
}

.hero-brand span {
  display: block;
  font-family: var(--font-fa);
  font-size: 0.28em;
  letter-spacing: 0.35em;
  font-weight: 500;
  margin-top: 0.55rem;
  opacity: 0.85;
}

.hero-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
  max-width: 18ch;
  margin-bottom: 0.85rem;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1s var(--ease) 0.3s forwards;
}

.hero-text {
  color: rgba(255, 255, 255, 0.82);
  max-width: 38ch;
  margin-bottom: 1.75rem;
  font-weight: 300;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1s var(--ease) 0.45s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1s var(--ease) 0.6s forwards;
}

.hero-scroll {
  position: absolute;
  inset-inline-start: var(--pad);
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
}

.hero-scroll i {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, var(--brass), transparent);
  display: block;
  animation: line-pulse 2.2s ease-in-out infinite;
}

/* ---------- Section chrome ---------- */
.section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

.section-dark {
  background: var(--dark);
  color: #fff;
}

.section-soft {
  background: var(--bg-soft);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.85rem;
  font-weight: 600;
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  font-weight: 600;
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-dark .section-head p {
  color: rgba(255, 255, 255, 0.68);
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* ---------- Spaces (Cosentino-like applications) ---------- */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  min-height: 520px;
}

.space-tile {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  color: #fff;
  isolation: isolate;
}

.space-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.space-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 12, 11, 0.82));
  z-index: 1;
}

.space-tile:hover img {
  transform: scale(1.08);
}

.space-tile-body {
  position: absolute;
  inset-inline: 1.1rem;
  bottom: 1.1rem;
  z-index: 2;
}

.space-tile h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.space-tile span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ---------- Split story ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.split-media {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
}

.split-copy p + p {
  margin-top: 0.9rem;
}

.split-copy p {
  color: var(--muted);
}

.split-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--font-brand);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Collections / products ---------- */
.collections-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.collection-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  min-height: 360px;
}

.collection-item img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.collection-item:hover img {
  transform: scale(1.05);
}

.collection-meta {
  padding: 1.15rem 1.2rem 1.35rem;
}

.collection-meta .code {
  font-family: var(--font-brand);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--brass);
  margin-bottom: 0.35rem;
}

.collection-meta h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.collection-meta p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Inspiration / projects ---------- */
.inspire-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.75rem;
}

.inspire-card {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  color: #fff;
}

.inspire-card:first-child {
  min-height: 520px;
  grid-row: span 2;
}

.inspire-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.inspire-card:hover img {
  transform: scale(1.06);
}

.inspire-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 12, 11, 0.85));
}

.inspire-body {
  position: absolute;
  inset-inline: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
}

.inspire-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.inspire-body p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 1.75rem 1.5rem;
  border-top: 2px solid var(--brass);
  background: rgba(255, 255, 255, 0.03);
}

.feature h3 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.feature p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
}

.cta-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 13, 0.7);
  z-index: -1;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 0.85rem;
}

.cta-band p {
  max-width: 42ch;
  margin-inline: auto;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Page hero (inner) ---------- */
.page-hero {
  padding: calc(var(--header-h) + 3.5rem) 0 3rem;
  background: var(--dark);
  color: #fff;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  max-width: 50ch;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Products page ---------- */
.product-list {
  display: grid;
  gap: 2.5rem;
}

.product-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  background: var(--surface);
  overflow: hidden;
}

.product-row:nth-child(even) .product-media {
  order: 2;
}

.product-media {
  min-height: 340px;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 340px;
}

.product-copy {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.product-copy .code {
  font-family: var(--font-brand);
  color: var(--brass);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.product-copy h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 0.75rem;
}

.product-copy p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.tag-list span {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.contact-card {
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
}

.contact-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
}

.contact-list strong {
  display: block;
  font-size: 0.8rem;
  color: var(--brass);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark-soft);
  color: rgba(255, 255, 255, 0.78);
  padding: 4rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand .brand-mark {
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  max-width: 34ch;
  font-size: 0.95rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.92rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--brass);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Content defaults ---------- */
.entry-content {
  max-width: 720px;
}

.entry-content > * + * {
  margin-top: 1rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.post-card img {
  aspect-ratio: 16/10;
  width: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 1.15rem;
}

.post-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.post-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Animations ---------- */
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-zoom {
  to {
    transform: scale(1.14);
  }
}

@keyframes line-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.7);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .spaces-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .collections-rail,
  .features,
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inspire-grid {
    grid-template-columns: 1fr 1fr;
  }

  .inspire-card:first-child {
    grid-column: span 2;
    grid-row: auto;
    min-height: 380px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: fixed;
    inset: 0;
    background: rgba(14, 17, 16, 0.97);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }

  .primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .nav-link {
    color: #fff !important;
    font-size: 1.25rem;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .site-header .menu-toggle.is-open span {
    background: #fff;
  }

  .split,
  .product-row,
  .product-row:nth-child(even) .product-media,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .product-row:nth-child(even) .product-media {
    order: 0;
  }

  .spaces-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .spaces-grid,
  .collections-rail,
  .features,
  .inspire-grid,
  .posts-grid,
  .footer-grid,
  .split-stats {
    grid-template-columns: 1fr;
  }

  .inspire-card:first-child {
    grid-column: auto;
  }

  .space-tile {
    min-height: 280px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
