/* EECG landing hero — precise bento structuralism
   Locked tokens: #1a1a1a / #2d2d2d / #4a4a4a, accent #e85d3a
   Space Grotesk (headings) + DM Sans (body) + Space Mono (labels) */

.eecg-bento {
  --ink: #1a1a1a;
  --surface: #2d2d2d;
  --line: rgba(232, 93, 58, 0.25);
  --ember: #e85d3a;
  --muted: rgba(26, 26, 26, 0.6);
  --label: rgba(26, 26, 26, 0.42);

  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: auto;
  padding: 88px 16px 28px;
  background: #ffffff;
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}


.eecg-bento::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(232, 93, 58, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(232, 93, 58, 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
}
.eecg-bento__grid { position: relative; z-index: 1; }

.eecg-bento *,
.eecg-bento *::before,
.eecg-bento *::after { box-sizing: border-box; }

@media (min-width: 992px) {
  .eecg-bento { padding: 32px; min-height: 100vh; }
}


.eecg-bento__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-content: stretch;
}

/* ---------- tiles ---------- */
.eecg-tile {
  position: relative;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: eecg-settle 0.62s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}
.eecg-tile--t1 { animation-delay: 0.05s; }
.eecg-tile--t2 { animation-delay: 0.13s; }
.eecg-tile--t3 { animation-delay: 0.21s; }
.eecg-tile--t4 { animation-delay: 0.29s; }
.eecg-tile--t5 { animation-delay: 0.37s; }
.eecg-tile--t6 { animation-delay: 0.45s; }

@keyframes eecg-settle {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- headline tile ---------- */
.eecg-tile--lede {
  grid-column: span 12;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28px;
  min-height: 0;
}

.eecg-ref {
  position: absolute;
  top: 0;
  right: 0;
  padding: 16px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}
.eecg-h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(1.85rem, 8.2vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-transform: none;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.eecg-h1 em {
  display: block;
  font-style: normal;
  font-weight: 500;
  color: var(--ember);
}
.eecg-lede {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 34rem;
  margin: 0;
}

.eecg-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.eecg-btn {
  display: inline-block;
  padding: 16px 32px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.eecg-btn--solid { background: var(--ember); }
.eecg-btn--solid:hover { background: #d14d2d; }
.eecg-btn--line { border-color: var(--line); }
.eecg-btn--line { color: var(--ink); }
.eecg-btn--line:hover { background: rgba(232, 93, 58, 0.08); border-color: var(--ember); }
.eecg-btn:hover { transform: translateY(-1px); }

/* ---------- visuals ---------- */
.eecg-tile--shot { grid-column: span 12; min-height: 200px; padding: 0; }
.eecg-shot {
  width: 100%;
  height: 100%;
  min-height: inherit;
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
  opacity: 0.95;
  transition: filter 0.7s ease, opacity 0.7s ease, transform 1.2s ease;
}
.eecg-tile--shot:hover .eecg-shot {
  filter: none;
  opacity: 1;
  transform: scale(1.03);
}

.eecg-tile--plate {
  grid-column: span 12;
  background: #fff;
  min-height: 260px;
  padding: 0;
}
.eecg-tile--plate .eecg-shot {
  filter: saturate(0.95);
  opacity: 0.9;
}
.eecg-plate__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(232, 93, 58, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 93, 58, 0.22) 1px, transparent 1px);
  background-size: 32px 32px;
}
.eecg-chip {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.eecg-chip i {
  width: 8px;
  height: 8px;
  background: var(--ember);
  display: block;
}

/* ---------- metric tiles ---------- */
.eecg-tile--metric {
  grid-column: span 6;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 132px;
}
.eecg-tile--metric.is-ember {
  background: var(--ember);
  border-color: var(--ember);
}
.eecg-metric__label {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--label);
}
.is-ember .eecg-metric__label { color: rgba(255, 255, 255, 0.78); font-weight: 700; }
.is-ember .eecg-metric__value, .is-ember { color: #fff; }
.eecg-metric__value {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}
.is-ember .eecg-metric__value { font-weight: 700; }

/* ---------- info tile ---------- */
.eecg-tile--info {
  grid-column: span 12;
  padding: 28px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.eecg-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.eecg-eyebrow s {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--ember);
  transform-origin: left;
  animation: eecg-draw 0.7s 0.5s cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
@keyframes eecg-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.eecg-eyebrow span {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
}
.eecg-info__title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0 auto 0 0;
  max-width: 30rem;
}
.eecg-info__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.eecg-info__specs b {
  display: block;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 4px;
}
.eecg-info__specs span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- desktop bento composition ---------- */
@media (min-width: 992px) {
  .eecg-bento__grid { grid-auto-rows: minmax(0, 1fr); }
  .eecg-tile--lede { grid-column: span 8; grid-row: span 3; padding: 40px; min-height: 0; }
  .eecg-tile--shot { grid-column: span 4; grid-row: span 2; min-height: 0; }
  .eecg-tile--metric { grid-column: span 2; grid-row: span 1; min-height: 0; }
  .eecg-tile--info { grid-column: span 5; grid-row: span 3; min-height: 0; padding: 32px; }
  .eecg-tile--plate { grid-column: span 7; grid-row: span 3; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .eecg-tile, .eecg-eyebrow s {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
