/* ============================================================
   ePortal homepage — SD Guthrie Speciality Ingredients
   Built on design-system tokens (css/sdgi-tokens.css)
   ============================================================ */

.ep-home {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.ep-home a {
  text-decoration: none;
  color: inherit;
}

.ep-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-10);
}

/* ---- Buttons ---- */
.ep-btn {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-pill);
  border: 1.6px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast),
    box-shadow var(--dur),
    color var(--dur-fast),
    border-color var(--dur-fast);
}

.ep-btn-lg {
  font-size: 16px;
  padding: 16px 28px;
}

.ep-btn-md {
  font-size: 15px;
  padding: 13px 22px;
}

.ep-btn-primary {
  background: var(--palm-red);
  color: #fff;
}

.ep-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
  color: #fff;
}

.ep-btn-primary:active {
  background: var(--accent-press);
  transform: translateY(0) scale(0.99);
}

.ep-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.ep-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.ep-btn-outline {
  background: transparent;
  color: var(--n-900);
  border-color: var(--n-300);
}

.ep-btn-outline:hover {
  border-color: var(--palm-red);
  color: var(--palm-red);
}

.ep-btn-on-green {
  background: #fff;
  color: var(--sustain-green);
}

.ep-btn-on-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  color: var(--sustain-green);
}

/* ---- Hero (full-bleed) ---- */
.ep-hero {
  position: relative;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--n-900);
}

.ep-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(70% 55% at 72% 18%, rgba(232, 70, 38, 0.42), transparent 60%),
    radial-gradient(90% 80% at 12% 100%, rgba(156, 16, 6, 0.5), transparent 60%),
    linear-gradient(120deg, #240c06 0%, #3a0f08 38%, #120b09 100%);
}

.ep-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/background.png");
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  mix-blend-mode: luminosity;
}

.ep-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(14, 12, 11, 0.72) 0%,
    rgba(14, 12, 11, 0.42) 48%,
    transparent 78%
  );
}

.ep-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-20) var(--space-10);
}

.ep-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  opacity: 0;
  animation: ep-rise 0.7s var(--ease-out) 0.05s forwards;
}

.ep-brand img {
  height: 42px;
  width: auto;
  display: block;
}

.ep-brand-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.28);
}

.ep-brand-label {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.ep-hero-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0;
  max-width: 14ch;
  opacity: 0;
  animation: ep-rise 0.75s var(--ease-out) 0.15s forwards;
}

.ep-hl {
  position: relative;
  white-space: nowrap;
  color: #fff;
}

.ep-hl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.13em;
  background: var(--palm-orange);
  border-radius: 2px;
}

.ep-hero-lead {
  font-size: 19px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  margin: 26px 0 0;
  max-width: 34rem;
  font-weight: 400;
  opacity: 0;
  animation: ep-rise 0.75s var(--ease-out) 0.28s forwards;
}

.ep-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  opacity: 0;
  animation: ep-rise 0.75s var(--ease-out) 0.4s forwards;
}

.ep-hero-quote {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: 14px;
  opacity: 0;
  animation: ep-rise 0.75s var(--ease-out) 0.55s forwards;
}

.ep-hero-quote i {
  color: var(--palm-orange);
  font-size: 1.1rem;
}

/* ---- Sections ---- */
.ep-section {
  padding: var(--space-24) 0;
}

.ep-section-sunken {
  background: var(--n-50);
}

.ep-eyebrow {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--palm-red);
  display: inline-block;
}

.ep-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 14px 0 0;
  color: var(--n-900);
}

.ep-lead {
  font-size: 18px;
  line-height: 1.62;
  color: var(--n-600);
  margin: 20px 0 0;
  font-weight: 400;
}

.ep-body {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--n-600);
  margin: 0;
}

.ep-hl-text {
  position: relative;
  white-space: nowrap;
}

.ep-hl-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.03em;
  height: 0.12em;
  background: var(--palm-orange);
  border-radius: 2px;
}

/* ---- Portal tools (interaction cards) ---- */
.ep-tools-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.ep-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ep-tool {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur),
    border-color var(--dur);
}

.ep-tool:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--n-200);
}

.ep-tool:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 12, 15, 0.14);
  border-color: var(--palm-red);
}

.ep-tool-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fdebe7;
  color: var(--palm-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex: none;
}

.ep-tool h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--n-900);
}

.ep-tool p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--n-500);
  margin: 0;
  flex: 1;
}

.ep-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--palm-red);
  margin-top: 4px;
  transition: gap var(--dur-fast);
}

.ep-tool:hover .ep-tool-link {
  gap: 11px;
}

/* ---- Feature row ---- */
.ep-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.ep-plate {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(140deg, #e84626, #9c1006);
}

.ep-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 78% 8%, rgba(255, 255, 255, 0.16), transparent 55%);
}

.ep-plate-ic {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.5);
  font-size: 3rem;
}

.ep-plate-cap {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
}

.ep-plate-photo {
  background: var(--n-100);
}

.ep-plate-photo::after {
  display: none;
}

.ep-plate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-promise {
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--n-700);
  padding-left: 18px;
  border-left: 3px solid var(--palm-orange);
  font-style: italic;
}

.ep-feature-cta {
  margin-top: 26px;
}

.ep-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ep-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--n-800);
  box-shadow: var(--shadow-xs);
}

.ep-trust-item i {
  color: var(--palm-red);
}

/* ---- Sustainability band ---- */
.ep-band-green {
  background: var(--sustain-green);
  color: #fff;
}

.ep-sustain {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.ep-plate-green {
  background: linear-gradient(140deg, #0a6b38, #004d24);
}

.ep-band-green .ep-eyebrow {
  color: var(--golden);
}

.ep-band-green .ep-h2 {
  color: #fff;
}

.ep-band-green .ep-lead {
  color: rgba(255, 255, 255, 0.82);
}

.ep-creds {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 26px 0 0;
}

.ep-cred {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.ep-cred-ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--golden);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* ---- Closing CTA ---- */
.ep-close {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.ep-close .ep-hero-cta {
  justify-content: center;
  opacity: 1;
  animation: none;
}

/* ---- Motion ---- */
@keyframes ep-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ep-brand,
  .ep-hero-h1,
  .ep-hero-lead,
  .ep-hero-cta,
  .ep-hero-quote {
    opacity: 1;
    animation: none;
  }

  .ep-tool:hover,
  .ep-btn:hover {
    transform: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 940px) {
  .ep-tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ep-feature,
  .ep-sustain {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .ep-hero-quote {
    display: none;
  }

  .ep-hero {
    min-height: auto;
  }

  .ep-hero-inner {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

@media (max-width: 560px) {
  .ep-wrap,
  .ep-hero-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .ep-tools-grid {
    grid-template-columns: 1fr;
  }

  .ep-brand img {
    height: 32px;
  }

  .ep-brand-label {
    font-size: 12px;
  }
}
