/* ==========================================================================
   Engravous — front page (agent B). Handle: engravous-home
   Loaded on is_front_page() after tokens.css → base.css → layout.css.
   Values are lifted 1:1 from the "isHome" mockup; colors only via tokens.
   ========================================================================== */

.eg-home {
  /* The mockup's dark ink (#293636) and muted copy (#4a5a58) are not tokens;
     they resolve to a hook variable (if base/layout defines one) or a token. */
  --eg-home-dark: var(--eg-dark, var(--color-neutral-900));
  --eg-home-muted: var(--eg-muted, color-mix(in srgb, var(--color-text) 78%, var(--color-bg)));
  --eg-home-on-dark: color-mix(in srgb, var(--color-bg) 80%, transparent);
  --eg-home-on-dark-strong: color-mix(in srgb, var(--color-bg) 85%, transparent);
  --eg-home-radius-xl: calc(var(--radius-lg) * 1.15);
  display: block;
  overflow-x: clip;
}

/* Component links keep the text color (tokens.css paints bare <a> accent); the
   product cards (card.css, agent C) style their own links. */
.eg-section-head__link, .eg-cat-tile, .eg-b2b-tile, .eg-promo,
.eg-werkstatt__link, .eg-newsletter__privacy { color: inherit; text-decoration: none; }
.eg-hero__trust, .eg-services { list-style: none; margin: 0; padding: 0; }
.eg-home .eg-cover { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Kicker lives in base.css (agent H); repeated here scoped to the home page with
   the mockup values so the page does not depend on stylesheet load order. */
.eg-home .eg-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--color-accent-700);
}

/* Section header row (kicker + h2 left, link/tags right) */
.eg-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; margin-bottom: 36px;
}
.eg-section-head__lead { min-width: 0; }
.eg-section-head .eg-kicker { margin-bottom: 14px; }
.eg-section-head__title { font-size: 40px; line-height: 1.12; margin: 0; }
.eg-section-head__link {
  font-size: 14px; font-weight: 600; color: var(--color-accent-700); white-space: nowrap;
}
.eg-section-head__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.eg-section-head__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-section-head__tags .tag { padding: 8px 18px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.eg-hero { background: var(--color-bg); }
.eg-hero__inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1.02fr 0.98fr; min-height: 560px;
}
.eg-hero__copy {
  min-width: 0; padding: 88px 72px 88px 56px;
  display: flex; flex-direction: column; justify-content: center;
}
.eg-hero .eg-kicker { margin-bottom: 24px; }
.eg-hero__title {
  font-size: 60px; line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 24px; max-width: 14ch;
}
.eg-hero__text {
  font-size: 18px; line-height: 1.65; max-width: 46ch;
  color: var(--eg-home-muted); margin: 0 0 34px; text-wrap: pretty;
}
.eg-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.eg-hero__btn { font-size: 15px; padding: 14px 30px; }
.eg-hero__btn--secondary { padding: 14px 28px; }
.eg-hero__trust {
  display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 52px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-neutral-700);
}
.eg-hero__trust li { white-space: nowrap; }
.eg-hero__media { min-width: 0; position: relative; background: var(--color-surface); }
.eg-hero__media .eg-cover { position: absolute; inset: 0; }

/* --------------------------------------------------------------------------
   Categories
   -------------------------------------------------------------------------- */
.eg-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.eg-cat-tile {
  display: block; min-width: 0; position: relative; aspect-ratio: 5 / 4;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface);
}
.eg-cat-tile .eg-cover { transition: transform 0.45s ease; }
.eg-cat-tile:hover .eg-cover { transform: scale(1.03); }
.eg-cat-tile__label {
  position: absolute; left: 20px; bottom: 18px; max-width: calc(100% - 40px);
  background: var(--color-bg); border-radius: 999px; padding: 9px 20px;
  font-size: 14px; font-weight: 600; line-height: 1.3; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eg-cat-tile__count { color: var(--color-neutral-600); font-weight: 400; }

.eg-b2b-tile {
  min-width: 0; aspect-ratio: 5 / 4; border-radius: var(--radius-lg);
  background: var(--eg-home-dark); color: var(--color-bg);
  display: flex; flex-direction: column; justify-content: center; padding: 28px;
}
.eg-b2b-tile__title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 23px; line-height: 1.12; color: var(--color-bg); margin-bottom: 8px;
}
.eg-b2b-tile__text { font-size: 14px; color: var(--eg-home-on-dark); line-height: 1.55; margin-bottom: 16px; }
.eg-b2b-tile__link { font-size: 14px; font-weight: 600; color: var(--color-accent-400); }
.eg-b2b-tile:hover .eg-b2b-tile__link { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Bestsellers — cards come from engravous_product_card() (agent C). Because
   shop.css is not enqueued on the front page, the card shell and the
   fallback card are styled here with the mockup's values.
   -------------------------------------------------------------------------- */
.eg-best-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.eg-best-grid > * {
  min-width: 0; background: var(--color-surface);
  border-radius: var(--eg-home-radius-xl); overflow: hidden;
  display: flex; flex-direction: column;
}
.eg-best-grid .btn { font-size: 13px; padding: 9px 16px; white-space: nowrap; }

.eg-product-card__media {
  display: block; position: relative; aspect-ratio: 1 / 1; background: var(--color-neutral-200);
}
.eg-product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.eg-product-card__badge {
  position: absolute; top: 14px; left: 14px; font-size: 11px; letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: 999px; pointer-events: none;
  background: var(--color-accent-2-100); color: var(--color-accent-2-800);
}
.eg-product-card__badge--new { background: var(--color-accent-100); color: var(--color-accent-800); }
.eg-product-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.eg-product-card__cat {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-neutral-600); margin-bottom: 8px;
}
.eg-product-card__name {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 19px; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 10px;
}
.eg-product-card__spec { font-size: 13px; color: var(--eg-home-muted); margin-bottom: 16px; }
.eg-product-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto;
}
.eg-product-card__price { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 21px; }
.eg-product-card__price del { opacity: 0.55; font-size: 0.8em; margin-right: 6px; }
.eg-product-card__price ins { text-decoration: none; }

/* --------------------------------------------------------------------------
   Promo tiles (Gravur-Service / Für Unternehmen)
   -------------------------------------------------------------------------- */
.eg-promo-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.eg-promo {
  display: block; min-width: 0; position: relative; min-height: 320px;
  border-radius: var(--eg-home-radius-xl); overflow: hidden;
  background: var(--color-surface); color: var(--color-bg);
}
.eg-promo .eg-cover { position: absolute; inset: 0; transition: transform 0.6s ease; }
.eg-promo:hover .eg-cover { transform: scale(1.03); }
.eg-promo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--eg-home-dark) 90%, transparent) 0%,
    color-mix(in srgb, var(--eg-home-dark) 55%, transparent) 55%,
    transparent 100%
  );
}
.eg-promo__content {
  position: relative; z-index: 1; min-height: 320px; padding: 48px;
  display: flex; flex-direction: column; justify-content: center;
}
.eg-promo__kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--color-accent-400); margin-bottom: 16px;
}
.eg-promo__title { font-size: 32px; line-height: 1.12; margin: 0 0 12px; color: var(--color-bg); max-width: 14ch; }
.eg-promo__text { font-size: 15px; line-height: 1.6; color: var(--eg-home-on-dark-strong); max-width: 32ch; margin: 0; }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.eg-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.eg-service { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.eg-service__icon { color: var(--color-accent-2-700); }
.eg-service__icon svg { display: block; width: 26px; height: 26px; }
.eg-service__title {
  font-family: var(--font-body); font-weight: 600; font-size: 16px; line-height: 1.4;
  letter-spacing: 0; margin: 0;
}
.eg-service__body { font-size: 14px; line-height: 1.65; color: var(--eg-home-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Aus der Werkstatt
   -------------------------------------------------------------------------- */
.eg-werkstatt {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center;
  background: var(--color-surface); border-radius: var(--eg-home-radius-xl); padding: 56px;
}
.eg-werkstatt__media {
  min-width: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--color-surface);
}
.eg-werkstatt__media.eg-media--empty { background: var(--color-neutral-200); }
.eg-werkstatt__copy { min-width: 0; }
.eg-werkstatt .eg-kicker { margin-bottom: 20px; }
.eg-werkstatt__title { font-size: 38px; line-height: 1.1; margin: 0 0 22px; max-width: 18ch; }
.eg-werkstatt__text { font-size: 17px; line-height: 1.7; color: var(--eg-home-muted); max-width: 52ch; margin: 0 0 18px; }
.eg-werkstatt__link { font-size: 15px; font-weight: 600; color: var(--color-accent-700); }
.eg-werkstatt__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Kundenstimmen
   -------------------------------------------------------------------------- */
.eg-reviews .eg-kicker { margin-bottom: 14px; }
.eg-reviews__title { font-size: 40px; line-height: 1.12; margin: 0 0 40px; }
.eg-reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eg-review {
  min-width: 0; background: var(--color-surface);
  border-radius: var(--eg-home-radius-xl); padding: 34px 36px;
}
.eg-review__stars { display: flex; gap: 3px; color: var(--color-accent); margin-bottom: 18px; }
.eg-review__stars svg { display: block; width: 15px; height: 15px; }
.eg-review__text { font-size: 16px; line-height: 1.65; margin: 0 0 22px; }
.eg-review__text p { margin: 0 0 12px; }
.eg-review__text p:last-child { margin-bottom: 0; }
.eg-review__who {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-neutral-700);
}

/* --------------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------------- */
.eg-newsletter { padding-bottom: 88px; }
.eg-newsletter__box {
  background: var(--color-surface); border-radius: var(--eg-home-radius-xl);
  padding: 56px 64px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center;
}
.eg-newsletter__copy, .eg-newsletter__form-wrap { min-width: 0; }
.eg-newsletter__title { font-size: 34px; line-height: 1.12; margin: 0 0 12px; max-width: 22ch; }
.eg-newsletter__text { font-size: 16px; line-height: 1.65; color: var(--eg-home-muted); margin: 0; max-width: 46ch; }
.eg-newsletter__form { margin: 0; }
.eg-newsletter__row { display: flex; gap: 10px; }
.eg-newsletter__input { flex: 1; min-width: 0; min-height: 48px; font-size: 15px; }
.eg-newsletter__btn { font-size: 15px; padding: 14px 28px; white-space: nowrap; }
.eg-newsletter__note { font-size: 12px; color: var(--color-neutral-700); margin: 12px 0 0; }
.eg-newsletter__privacy { text-decoration: underline; text-underline-offset: 3px; }
.eg-newsletter__notice {
  font-size: 14px; line-height: 1.45; margin: 0 0 14px; padding: 10px 18px; border-radius: 999px;
  background: var(--color-accent-2-100); color: var(--color-accent-2-800);
}
.eg-newsletter__notice--error { background: var(--color-accent-100); color: var(--color-accent-800); }

/* Honeypot + visually hidden label */
.eg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.eg-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Responsive — container paddings follow base.css (56 → 32 @1100 → 20 @720)
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .eg-hero__copy { padding: 72px 48px 72px 32px; }
  .eg-hero__title { font-size: 48px; }
  .eg-cat-grid, .eg-best-grid, .eg-services { grid-template-columns: repeat(2, 1fr); }
  .eg-werkstatt { gap: 40px; padding: 40px; }
  .eg-newsletter__box { padding: 44px 40px; gap: 40px; }
}

@media (max-width: 900px) {
  .eg-hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .eg-hero__copy { padding-right: 32px; }
  .eg-hero__media { aspect-ratio: 4 / 3; }
  .eg-hero__media.eg-media--empty { display: none; }
  .eg-werkstatt { grid-template-columns: 1fr; }
  .eg-werkstatt__media { max-width: 560px; }
  .eg-newsletter__box { grid-template-columns: 1fr; }
  .eg-reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .eg-home .eg-section { padding-top: 56px; }
  .eg-newsletter { padding-bottom: 56px; }
  .eg-hero__copy { padding: 56px 20px; }
  .eg-hero__title { font-size: 40px; }
  .eg-hero__text { font-size: 16px; }
  .eg-hero__trust { margin-top: 36px; }
  .eg-section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
  .eg-section-head__title, .eg-reviews__title { font-size: 32px; }
  .eg-reviews__title { margin-bottom: 28px; }
  .eg-werkstatt { padding: 24px; gap: 28px; }
  .eg-werkstatt__title { font-size: 30px; }
  .eg-werkstatt__text { font-size: 16px; }
  .eg-newsletter__box { padding: 32px 24px; gap: 28px; }
  .eg-newsletter__title { font-size: 28px; }
  .eg-promo__content { padding: 32px 24px; }
  .eg-promo__title { font-size: 26px; }
  .eg-review { padding: 26px 24px; }
  .eg-b2b-tile { padding: 22px; }
}

@media (max-width: 560px) {
  .eg-cat-grid, .eg-best-grid, .eg-services { grid-template-columns: 1fr; }
  .eg-newsletter__row { flex-wrap: wrap; }
  .eg-newsletter__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .eg-cat-tile .eg-cover, .eg-promo .eg-cover { transition: none; }
}
