/* ==========================================================================
   EcAl — salt slag treatment
   Industrial / utilitarian aesthetic: near-black, warm cream, rust orange.
   ========================================================================== */

:root {
  --ink: #101010;
  --ink-2: #171614;
  --cream: #f4ebe0;
  --cream-2: #efe4d6;
  --rust: #c1521d;
  --rust-hi: #d75e22;
  --line-dark: rgba(244, 235, 224, 0.14);
  --line-cream: rgba(16, 16, 16, 0.14);
  --on-dark: #f4ebe0;
  --on-dark-mut: #9a948b;
  --on-cream: #1a1713;
  --on-cream-mut: #6a5f52;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-slab: "Roboto Slab", Georgia, serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Shared type ------------------------------------------------------- */

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
}

.eyebrow--rust {
  color: var(--rust);
}
.eyebrow--cream {
  color: #b9ad9d;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Grain overlay for dark sections */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 16, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .container {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  width: 66px;
  aspect-ratio: 268.51 / 127.59;
  background-color: var(--cream);
  -webkit-mask-image: url("/ecal-mark.svg");
  mask-image: url("/ecal-mark.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  mask-position: left center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: opacity 0.2s var(--ease);
}
.wordmark:hover {
  opacity: 0.7;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--rust);
  background: transparent;
  border: 1px solid rgba(193, 82, 29, 0.55);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}
.lang-toggle:hover {
  background: var(--rust);
  color: var(--cream);
}

/* ---- Sections ---------------------------------------------------------- */

section {
  position: relative;
}

.section-dark {
  background: var(--ink);
  color: var(--on-dark);
}
.section-cream {
  background: var(--cream);
  color: var(--on-cream);
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
  padding-block: clamp(56px, 9vw, 104px);
  overflow: hidden;
}

.hero__eyebrow {
  color: #b9ad9d;
  margin-bottom: 26px;
}

.hero__media {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.6fr);
  gap: 14px;
  margin-bottom: 34px;
}

.logo-panel {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 190px;
}

/* EcAl logo — the SVG is used as a mask so it can be tinted to match the
   palette; the letter counters in the "Al" block let the navy panel show
   through, matching the brand lockup. */
.ecal-logo {
  width: min(230px, 72%);
  aspect-ratio: 268.51 / 167.22;
  background-color: var(--cream);
  -webkit-mask-image: url("/ecal-logo.svg");
  mask-image: url("/ecal-logo.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.photo-panel {
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.photo-panel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.005em;
  max-width: 30ch;
  margin: 0 0 34px;
  color: #ece3d6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--rust);
  color: #12100e;
}
.btn--primary:hover {
  background: var(--rust-hi);
}

.btn--ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(244, 235, 224, 0.4);
}
.btn--ghost:hover {
  border-color: var(--cream);
  background: rgba(244, 235, 224, 0.06);
}

.btn--lg {
  padding: 16px 26px;
  font-size: 15px;
}

/* ---- Why EcAl ---------------------------------------------------------- */

.why {
  padding-block: clamp(64px, 9vw, 118px);
}
.why .container {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1.35fr) minmax(0, 0.55fr);
  gap: clamp(24px, 5vw, 64px);
}
.why__body {
  font-family: var(--font-slab);
  font-weight: 400;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.6;
  color: #23201b;
  margin: 0;
  max-width: 42ch;
}
.why__body .accent {
  color: var(--rust);
}

/* ---- Two-column dark blocks (how / apart) ------------------------------ */

.split {
  padding-block: clamp(52px, 7vw, 88px);
}
.split .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: start;
}
.split + .split {
  border-top: 1px solid var(--line-dark);
}

.split__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin: 0;
}
.split__aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.split__body {
  color: var(--on-dark-mut);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.62;
  max-width: 52ch;
  margin: 0;
  padding-top: 6px;
}

.pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--rust-hi);
  background: rgba(193, 82, 29, 0.1);
  border: 1px solid rgba(193, 82, 29, 0.4);
  border-radius: 999px;
  padding: 8px 15px;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rust-hi);
}

/* ---- Contact ----------------------------------------------------------- */

.contact {
  padding-block: clamp(72px, 11vw, 150px);
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: #17140f;
  margin: 0 0 22px;
}
.contact__body {
  color: var(--on-cream-mut);
  font-size: clamp(15px, 1.6vw, 18px);
  max-width: 44ch;
  margin: 0 0 34px;
}

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-mut);
  border-top: 1px solid var(--line-dark);
}
.site-footer .container {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.site-footer a {
  color: #b9ad9d;
  font-weight: 700;
}
.site-footer a:hover {
  color: var(--cream);
}

/* ---- Reveal animation -------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] {
  transition-delay: 0.08s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 780px) {
  .hero__media {
    grid-template-columns: 1fr;
  }
  .why .container,
  .split .container {
    grid-template-columns: 1fr;
  }
  .why__body,
  .split__body {
    max-width: none;
  }
}
