/* ============================================================
   ALMANK METALS – styles.css
   Static one-page corporate website
   Palette: charcoal / graphite / cream / warm brass accent
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --charcoal:      #1C1B19;
  --dark:          #262421;
  --graphite:      #5A5754;
  --silver:        #9C9892;
  --stone:         #CCCAC5;
  --cream:         #F5F3EF;
  --offwhite:      #FAFAF8;
  --white:         #FFFFFF;
  --accent:        #B8965A;
  --accent-light:  #C9AB73;

  --nav-h:         94px;

  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont,
                   'Helvetica Neue', Arial, sans-serif;

  --space-xs:      0.5rem;
  --space-sm:      1rem;
  --space-md:      2rem;
  --space-lg:      4rem;
  --space-xl:      6rem;
  --space-2xl:     8rem;

  --radius-sm:     2px;
  --radius-md:     4px;

  --ease:          cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition:    0.25s var(--ease);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.15rem; font-weight: 500; }

p {
  color: var(--graphite);
  line-height: 1.75;
}

p + p { margin-top: 1em; }

.lead {
  font-size: 1.1rem;
  color: var(--charcoal);
  font-weight: 400;
  line-height: 1.7;
}

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-light { background: var(--offwhite); }
.section-mid   { background: var(--cream); }
.section-dark  { background: var(--charcoal); color: var(--white); }

.section-header {
  margin-bottom: var(--space-lg);
}

.section-header-light .section-title,
.section-header-light .section-label {
  color: var(--white);
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  color: var(--charcoal);
  margin-bottom: var(--space-sm);
}

.section-dark .section-title { color: var(--white); }
.section-dark p { color: var(--silver); }

.section-intro {
  max-width: 640px;
  color: var(--graphite);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 4px 16px rgba(184,150,90,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
}

.btn-full { width: 100%; justify-content: center; }

/* ── Navigation ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(28, 27, 25, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

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

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

.logo-img {
  height: 78px;
  width: auto;
  /* Logo is dark on transparent – invert on dark nav bg */
  filter: brightness(0) invert(1);
  transition: opacity var(--transition);
}

.logo-img:hover { opacity: 0.8; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  transition: color var(--transition);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

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

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.7) brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(28,27,25,0.45) 0%,
    rgba(28,27,25,0.60) 60%,
    rgba(28,27,25,0.80) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  padding: calc(var(--nav-h) + var(--space-lg)) var(--space-md) var(--space-xl);
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-md);
  opacity: 0.9;
}

.hero-title {
  color: var(--white);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
  font-weight: 300;
  letter-spacing: -0.03em;
}

.hero-title br { display: block; }

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(255,255,255,0.45);
  animation: bounce 2.4s ease-in-out infinite;
  transition: color var(--transition);
}

.hero-scroll:hover { color: rgba(255,255,255,0.8); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── About ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-xl);
  align-items: start;
}

.about-text p:first-child { margin-top: 0; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.stat-card {
  background: var(--cream);
  border: 1px solid var(--stone);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ── Scope Grid ─────────────────────────────────────────────── */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
}

.scope-card {
  background: var(--dark);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: background var(--transition);
}

.scope-card:hover { background: #2E2C29; }

.scope-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.scope-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}

.scope-card p {
  font-size: 0.9rem;
  color: var(--silver);
  line-height: 1.65;
}

/* ── Materials Grid ─────────────────────────────────────────── */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: var(--space-lg);
}

.material-photo {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--stone);
}

.material-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
  filter: saturate(0.8);
}

.material-photo:hover img {
  transform: scale(1.04);
  filter: saturate(1);
}

.materials-types {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.material-tag {
  background: var(--cream);
  border: 1px solid var(--stone);
  color: var(--graphite);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
}

/* ── Logistics ──────────────────────────────────────────────── */
.logistics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.logistics-photos {
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
}

.logistics-photo {
  overflow: hidden;
  background: var(--stone);
}

.logistics-photo-main {
  aspect-ratio: 16 / 10;
}

.logistics-photo-sec {
  aspect-ratio: 16 / 9;
}

.logistics-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.75);
  transition: filter 0.5s var(--ease);
}

.logistics-photo:hover img { filter: saturate(1); }

.logistics-text .section-label { display: block; margin-bottom: var(--space-sm); }
.logistics-text .section-title { margin-bottom: var(--space-md); }
.logistics-text p { margin-bottom: 1em; }

.logistics-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--space-md);
}

.logistics-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--graphite);
  font-weight: 500;
}

.logistics-features li svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Cooperation ────────────────────────────────────────────── */
.section-cooperation { border-top: 1px solid var(--stone); }

.cooperation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.coop-step {
  padding-top: var(--space-md);
  border-top: 2px solid var(--stone);
  transition: border-color var(--transition);
}

.coop-step:hover { border-top-color: var(--accent); }

.step-num {
  font-size: 2rem;
  font-weight: 300;
  color: var(--stone);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-sm);
  font-variant-numeric: tabular-nums;
}

.coop-step h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  letter-spacing: 0;
}

.coop-step p {
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-text .section-label { display: block; margin-bottom: var(--space-sm); }
.contact-text .section-title { margin-bottom: var(--space-md); }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: var(--space-lg);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--silver);
}

.contact-item svg { color: var(--accent); flex-shrink: 0; }

.contact-item address {
  color: var(--silver);
  font-size: 0.9rem;
  line-height: 1.55;
}

.contact-item a {
  color: var(--silver);
  transition: color var(--transition);
  border-bottom: 1px solid transparent;
}

.contact-item a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--silver);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.28);
}

.form-group select option {
  background: var(--dark);
  color: var(--white);
}

.form-group select:invalid,
.form-group select option[value=""] {
  color: rgba(255,255,255,0.28);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.09);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: -0.25rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
  height: 117px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.footer-contact a,
.footer-contact span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

.footer-contact a:hover { color: var(--accent-light); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  padding: var(--space-md) 0 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-legal span {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.03em;
}

.footer-bottom {
  padding-top: var(--space-sm);
  display: flex;
  justify-content: center;
}

.footer-bottom span {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.04em;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .scope-grid         { grid-template-columns: repeat(2, 1fr); }
  .cooperation-grid   { grid-template-columns: repeat(2, 1fr); }
  .about-grid         { grid-template-columns: 1fr; }
  .about-stats        { flex-direction: row; }
  .stat-card          { flex: 1; }
}

@media (max-width: 768px) {
  :root {
    --space-xl:  4rem;
    --space-2xl: 5rem;
  }

  /* Mobile nav – final approach
     .nav-links is inside .nav-inner (a flex row).
     Making it position:absolute breaks it out of the flex row entirely,
     so the logo+toggle row stays compact at nav-h height while the
     nav panel drops cleanly below it within the expanded header.
     Containing block = .site-header (position:fixed) → absolute top/left/right
     resolve against the header's own edges, not the viewport.
  */
  .nav-toggle { display: flex; }

  /* Expand header to full screen when menu is open.
     :has() triggers purely from nav-links.open class – no JS class needed.
     .site-header.menu-open is a JS-class fallback for older engines. */
  .site-header:has(.nav-links.open),
  .site-header.menu-open {
    height: 100dvh;
    height: 100vh;
    background: #1C1B19;
    overflow: hidden;
  }

  /* Pin nav-inner to compact height so logo+toggle stay at the very top */
  .site-header:has(.nav-links.open) .nav-inner,
  .site-header.menu-open .nav-inner {
    height: var(--nav-h);
    position: relative;
    z-index: 1;               /* above the absolute nav-links panel */
  }

  /* Nav panel: absolute, starts just below the 94px nav bar */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--nav-h));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
  }

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

  /* Dividers */
  .nav-links li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links li:first-child {
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  /* Links – explicit white colour; global a{} is dark so must override */
  .nav-links a {
    display: block;
    width: 100%;
    padding: 1.1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    color: rgba(255,255,255,0.85);
    border-bottom: none;
  }
  .nav-links a:hover,
  .nav-links a:active {
    color: var(--accent-light);
    border-bottom: none;
  }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: center; }

  /* Sections */
  .scope-grid          { grid-template-columns: 1fr; }
  .materials-grid      { grid-template-columns: repeat(2, 1fr); }
  .logistics-layout    { grid-template-columns: 1fr; }
  .contact-layout      { grid-template-columns: 1fr; }
  .cooperation-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-layout       { grid-template-columns: 1fr; gap: var(--space-lg); }
  .about-stats         { flex-direction: column; }
  .form-row            { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .materials-grid { grid-template-columns: 1fr; }
  .cooperation-grid { grid-template-columns: 1fr; }
  .hero-content { padding-top: calc(var(--nav-h) + 2rem); }
}

/* ── Scroll-triggered fade-in (progressive enhancement) ─────── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}
