/* ============================================
   APEX ALLOYS — Design tokens
   ============================================ */
:root {
  --ink: #0a0d0f;
  --ink-soft: #0d1013;
  --ink-line: rgba(247, 248, 244, 0.1);
  --ink-line-strong: rgba(247, 248, 244, 0.18);
  --paper: #f7f8f4;
  --paper-soft: #eef0ea;
  --slate: #111716;
  --slate-muted: #52605c;
  --cream: #f7f8f4;
  --cream-muted: rgba(247, 248, 244, 0.68);
  --cream-faint: rgba(247, 248, 244, 0.42);
  --green: #2fd07b;
  --green-deep: #1f9c5c;
  --green-wash: rgba(47, 208, 123, 0.12);
  --green-line: rgba(47, 208, 123, 0.35);

  --font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Roboto Mono", "SF Mono", ui-monospace, monospace;

  --container: 1180px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 100px;

  --space-section: 72px;
  --space-section-lg: 108px;
}

@media (min-width: 900px) {
  :root {
    --space-section: 100px;
    --space-section-lg: 148px;
  }
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-display);
  background: var(--ink);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, textarea { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 900px) {
  .container { padding: 0 40px; }
}

.section {
  padding: var(--space-section) 0;
}
.section--lg { padding: var(--space-section-lg) 0; }
.section--light { background: var(--paper); color: var(--slate); }
.section--ink { background: var(--ink); }
.section--soft { background: var(--ink-soft); }

/* ============================================
   Typography
   ============================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-wash);
  border: 1px solid var(--green-line);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

h1, .h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--cream);
}
h2, .h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.14;
}
h3, .h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream-muted);
}
.section--light .lede { color: var(--slate-muted); }
.section--light h2 { color: var(--slate); }
p.body { font-size: 15px; line-height: 1.65; color: var(--cream-muted); }
.section--light p.body { color: var(--slate-muted); }

@media (min-width: 700px) {
  h1, .h1 { font-size: 54px; }
  h2, .h2 { font-size: 38px; }
}
@media (min-width: 1100px) {
  h1, .h1 { font-size: 64px; }
  h2, .h2 { font-size: 42px; }
  .lede { font-size: 19px; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  padding: 15px 24px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--green); color: #08130d; }
.btn--primary:hover { opacity: 0.9; }
.btn--ghost {
  background: rgba(247, 248, 244, 0.06);
  border: 1px solid var(--ink-line-strong);
  color: var(--cream);
}
.btn--ghost:hover { background: rgba(247, 248, 244, 0.1); }
.btn--dark { background: var(--slate); color: var(--paper); }
.btn--block { width: 100%; }

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10, 13, 15, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
@media (min-width: 900px) {
  .nav { padding: 16px 40px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}
.brand span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cream); }

.nav-actions {
  display: none;
  align-items: center;
  gap: 12px;
}
.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(247, 248, 244, 0.08);
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--radius-pill);
  padding: 4px;
}
.lang-switch a {
  font-size: 11.5px;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  color: var(--cream-faint);
}
.lang-switch a[aria-current="page"] { background: var(--green); color: #08130d; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: rgba(247, 248, 244, 0.08);
  border: 1px solid var(--ink-line-strong);
  flex: none;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 20px 28px;
  border-top: 1px solid var(--ink-line);
}
.mobile-panel.open { display: flex; }
.mobile-panel a {
  padding: 15px 4px;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink-line);
  color: var(--cream);
}
.mobile-panel .btn { margin-top: 16px; }
.mobile-panel .lang-switch { margin-top: 12px; align-self: flex-start; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
  .nav-toggle { display: none; }
  .mobile-panel { display: none !important; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 44px 0 56px;
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(47, 208, 123, 0.14), transparent),
    var(--ink);
}
@media (min-width: 900px) {
  .hero { padding: 88px 0 96px; }
}
.hero-tag { margin-bottom: 22px; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 560px) {
  .hero-actions { flex-direction: row; }
}

.hero--simple .lede { margin-bottom: 0; }

/* ============================================
   Cards & Grids
   ============================================ */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid rgba(17, 23, 22, 0.08);
  border-radius: var(--radius-md);
  padding: 26px;
}
.card svg, .card .icon { color: var(--green); margin-bottom: 18px; }
.card h3 { color: var(--slate); margin-bottom: 10px; }
.card p { font-size: 14.5px; line-height: 1.6; color: var(--slate-muted); }

.card--dark {
  background: linear-gradient(180deg, rgba(247,248,244,0.06), rgba(247,248,244,0.02));
  border: 1px solid var(--ink-line-strong);
  border-radius: 22px;
  padding: 26px;
}
.card--dark.card--accent {
  background: linear-gradient(180deg, rgba(47,208,123,0.14), rgba(247,248,244,0.02));
  border-color: var(--green-line);
}
.card--dark h3 { color: var(--cream); margin-bottom: 10px; font-size: 22px; }
.card--dark p { font-size: 14.5px; line-height: 1.6; color: var(--cream-faint); }

.step-card {
  background: rgba(247,248,244,0.04);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  padding: 26px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 14px;
  display: block;
}
.step-card h3 { margin-bottom: 10px; }
.step-card p { font-size: 14.5px; line-height: 1.6; color: var(--cream-muted); }

/* ============================================
   Media box (photo containers)
   ============================================ */
.media-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--ink-line-strong);
  aspect-ratio: 4 / 3;
}
.media-box img { width: 100%; height: 100%; object-fit: cover; }
.media-box--wide { aspect-ratio: 16 / 9; }

/* ============================================
   Stats
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.stat .num {
  font-size: 30px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
}
.stat .label {
  font-size: 13px;
  color: var(--cream-faint);
  margin-top: 4px;
}
@media (min-width: 900px) {
  .stat .num { font-size: 38px; }
}

/* ============================================
   Two-column layout
   ============================================ */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split--reverse { direction: rtl; }
  .split--reverse > * { direction: ltr; }
}

/* ============================================
   Form
   ============================================ */
.form-grid { display: grid; gap: 18px; margin-top: 8px; }
@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cream-muted);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: rgba(247,248,244,0.05);
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--cream);
  font-size: 15px;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23f7f8f4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field select option { background: var(--ink); color: var(--cream); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  background-color: rgba(247,248,244,0.08);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--cream-faint); }

/* ============================================
   Gallery
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(47,208,123,0.16), rgba(247,248,244,0.04));
  border: 1px solid var(--ink-line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  text-transform: uppercase;
}
.gallery-item svg { color: var(--green); opacity: 0.5; }

/* ============================================
   CTA band
   ============================================ */
.cta-band {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.cta-band .btn { margin-top: 28px; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding: 56px 0 32px;
}
@media (min-width: 900px) {
  .site-footer { padding: 72px 0 40px; }
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
@media (min-width: 900px) {
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.footer-copy h3 { font-size: 24px; margin-bottom: 12px; max-width: 420px; }
.footer-copy p { font-size: 14.5px; color: var(--cream-faint); max-width: 420px; line-height: 1.6; }
.footer-cta a { color: var(--green); font-weight: 700; font-size: 15px; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  font-size: 12.5px;
  color: var(--cream-faint);
}

/* ============================================
   Utilities
   ============================================ */
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }
.max-w-content { max-width: 720px; }
.center.max-w-content { margin-left: auto; margin-right: auto; }
