/* ============================================================
   Vertex Metals Ltd — Layout Styles
   Navigation, page sections, grids, footer
   ============================================================ */

/* ─── Public navigation ──────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(10,23,40,0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--color-border-dark);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  display: none;
}

@media (min-width: 480px) {
  .nav-logo-text { display: block; }
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-cta {
  display: none;
}

@media (min-width: 768px) {
  .nav-cta { display: inline-flex; }
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: all 0.25s ease;
}

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

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-primary);
  border-top: 1px solid var(--color-border-dark);
  padding: var(--space-6);
  z-index: 99;
}

.nav-mobile.open { display: block; }

.nav-mobile a {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-dark);
  text-decoration: none;
  transition: color var(--transition);
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--color-accent); }

.nav-mobile .btn {
  margin-top: var(--space-4);
  width: 100%;
  justify-content: center;
}

/* ─── Page hero ──────────────────────────────────────────── */

.hero {
  background: var(--color-primary);
  padding-top: calc(var(--nav-height) + var(--space-24));
  padding-bottom: var(--space-24);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 65% 50%, rgba(122,184,212,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(122,184,212,0.04) 1px, transparent 1px),
                    linear-gradient(to right, rgba(122,184,212,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero {
  background: var(--color-primary);
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(122,184,212,0.06) 0%, transparent 55%);
  pointer-events: none;
}

/* ─── Section background variants ───────────────────────── */

.bg-dark    { background: var(--color-primary); }
.bg-mid     { background: var(--color-primary-mid); }
.bg-surface { background: var(--color-surface); }
.bg-white   { background: var(--color-surface-raised); }
.bg-accent  { background: var(--color-accent); }

/* ─── Grids ──────────────────────────────────────────────── */

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* Content + fixed sidebar (collapses to single column on mobile) */
.grid-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 768px) {
  .grid-sidebar { grid-template-columns: 1fr; }
}

/* 3-col stat strip — cells become rows on small screens */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: var(--space-16);
}

@media (max-width: 640px) {
  .grid-stats { grid-template-columns: 1fr; }
  .grid-stats > * { border-left: none !important; border-top: 1px solid var(--color-border-dark); }
  .grid-stats > *:first-child { border-top: none; }
}

/* ─── Footer ─────────────────────────────────────────────── */

.footer {
  background: var(--color-primary);
  border-top: 1px solid var(--color-border-dark);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  color: rgba(255,255,255,0.4);
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 280px;
  margin-top: var(--space-4);
}

.footer-brand .nav-logo { margin-bottom: var(--space-4); }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  margin-bottom: var(--space-3);
  transition: color var(--transition);
}

.footer-col a:hover { color: rgba(255,255,255,0.75); }

.footer-col address {
  font-style: normal;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.25);
}

/* ─── Video banner (homepage hero + inner page banners) ──── */

.hero-video {
  position: relative;
  min-height: 80vh;
  background: var(--color-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.90;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,23,40,0.25) 0%,
    rgba(10,23,40,0.55) 45%,
    rgba(10,23,40,0.90) 100%
  );
  pointer-events: none;
}

.hero-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  pointer-events: none;
  opacity: 0.18;
}

.hero-video-placeholder svg {
  width: 56px;
  height: 56px;
  color: var(--color-accent);
}

.hero-video-placeholder span {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-video-content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + var(--space-24));
  padding-bottom: var(--space-16);
  width: 100%;
}

/* Shorter banner for inner pages */
.page-video-banner {
  position: relative;
  height: 50vh;
  min-height: 320px;
  background: var(--color-primary);
  overflow: hidden;
}

.page-video-banner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-video-banner .hero-video-overlay {
  background: linear-gradient(
    to bottom,
    rgba(10,23,40,0.25) 0%,
    rgba(10,23,40,0.55) 100%
  );
}

/* ─── Product category layout ────────────────────────────── */

.product-category {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-6);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.product-category:hover {
  border-color: rgba(122,184,212,0.35);
  box-shadow: var(--shadow-md);
}

.product-category-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  align-items: flex-start;
  padding: var(--space-10);
}

.product-forms-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-6);
  margin: var(--space-4) 0;
}

@media (max-width: 480px) {
  .product-forms-list { grid-template-columns: 1fr; }
}

.product-forms-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  list-style: none;
}

.product-forms-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ─── Sector cards ───────────────────────────────────────── */

.sector-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-8);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.sector-card:hover {
  border-color: rgba(122,184,212,0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sector-card-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

/* ─── Sustainability check list ──────────────────────────── */

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.check-list li::before {
  content: '';
  flex-shrink: 0;
  margin-top: 4px;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ab8d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ─── Partner benefits grid ──────────────────────────────── */

.partner-benefit-card {
  background: var(--color-primary-mid);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius);
  padding: var(--space-8);
  transition: border-color var(--transition);
}

.partner-benefit-card:hover {
  border-color: rgba(122,184,212,0.35);
}

/* ─── ISO compliance callout ─────────────────────────────── */

.iso-callout {
  background: rgba(122,184,212,0.06);
  border: 1px solid rgba(122,184,212,0.2);
  border-radius: var(--radius);
  padding: var(--space-8);
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.iso-callout-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(122,184,212,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 480px) {
  .iso-callout { flex-direction: column; }
}
