/* TangramFood public homepage */

.tf-home {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 5vw, 4.5rem);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, #f9efe7 0%, #ffffff 70%);
}

.tf-home__inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.tf-hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, #e85e27 0%, #d24f1f 45%, #c3461d 100%);
  border-radius: 24px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
  box-shadow: var(--tgf-shadow);
}

.tf-hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: clamp(260px, 38vw, 420px);
  height: clamp(260px, 38vw, 420px);
  background: url('../dots.png') center/contain no-repeat;
  opacity: 0.2;
  transform: rotate(12deg);
}

.tf-hero__content {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.75rem);
  position: relative;
  z-index: 1;
}

.tf-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.tf-hero__eyebrow::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.tf-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  line-height: 1.05;
  color: #fff;
  margin: 0;
}

.tf-hero__lead {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  max-width: 38ch;
}

.tf-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.65rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tf-button--primary {
  background: #ffffff;
  color: #c3461d;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.12);
}

.tf-button--primary:hover,
.tf-button--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 32px rgba(0, 0, 0, 0.14);
}

.tf-button--primary:focus-visible {
  outline: 3px solid transparent;
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 6px #c3461d,
    0 22px 32px rgba(0, 0, 0, 0.18);
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 6px color-mix(in srgb, var(--tgf-primary, #e85e27) 70%, #0d0d0d 30%),
    0 22px 32px rgba(0, 0, 0, 0.18);
}

.tf-button--ghost {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.tf-button--ghost:hover,
.tf-button--ghost:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.tf-button--ghost:focus-visible {
  outline: 3px solid transparent;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 6px rgba(195, 70, 29, 0.85),
    0 22px 32px rgba(0, 0, 0, 0.24);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 6px color-mix(in srgb, var(--tgf-primary, #e85e27) 65%, #050505 35%),
    0 22px 32px rgba(0, 0, 0, 0.24);
}

.tf-metrics {
  display: grid;
  gap: 1.5rem;
  background: var(--tgf-surface);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--tgf-shadow);
}

.tf-metrics__list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.tf-metrics__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tf-metrics__number {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--tgf-primary);
  line-height: 1.1;
}

.tf-metrics__label {
  font-size: 0.95rem;
  color: var(--tgf-muted);
}

.tf-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.tf-section-heading__title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin: 0;
  color: var(--tgf-text);
}

.tf-section-heading__description {
  margin: 0;
  color: var(--tgf-muted);
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.6;
}

.tf-feature-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

.tf-feature-grid__items {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.tf-feature-card {
  background: var(--tgf-surface);
  border-radius: 18px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--tgf-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tf-feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(232, 94, 39, 0.12);
  color: var(--tgf-primary);
  font-size: 1.5rem;
}

.tf-feature-card__title {
  font-size: 1.2rem;
  margin: 0;
  color: var(--tgf-text);
}

.tf-feature-card__description {
  margin: 0;
  color: var(--tgf-muted);
  line-height: 1.6;
}

.tf-testimonials {
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.5rem);
  background: linear-gradient(135deg, rgba(32, 107, 133, 0.15) 0%, rgba(232, 94, 39, 0.08) 100%);
  border-radius: 22px;
  padding: clamp(2.5rem, 5vw, 3.5rem);
}

.tf-testimonials__list {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.tf-testimonial {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tf-testimonial__quote {
  font-size: 1rem;
  margin: 0;
  color: var(--tgf-text);
  line-height: 1.6;
}

.tf-testimonial__author {
  font-weight: 600;
  color: var(--tgf-primary);
  font-size: 0.95rem;
}

.tf-cta {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--tgf-surface);
  border-radius: 24px;
  padding: clamp(2.5rem, 5vw, 3.75rem);
  box-shadow: var(--tgf-shadow);
  text-align: center;
}

.tf-cta__title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0;
  color: var(--tgf-text);
}

.tf-cta__description {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--tgf-muted);
  line-height: 1.6;
}

.tf-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 900px) {
  .tf-hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .tf-hero::after {
    right: -40px;
    bottom: -60px;
  }

  .tf-hero__figure {
    position: relative;
    z-index: 1;
    justify-self: center;
  }

  .tf-hero__image {
    width: min(100%, 420px);
    border-radius: 28px;
    box-shadow: 0 18px 36px rgba(32, 107, 133, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tf-button,
  .tf-hero,
  .tf-feature-card,
  .tf-testimonial,
  .tf-cta {
    transition: none;
  }
}

@media (max-width: 768px) {
  /*
   * Ensure that the main hero headlines generated with GenerateBlocks keep
   * their horizontal layout on small screens. Some mobile browsers interpret
   * the flex/grid configuration applied by the block library and collapse the
   * content vertically, rendering one character per line. We explicitly reset
   * writing mode and display so the text flows naturally.
   */
  .gb-headline-2e093498,
  .gb-headline-3a1e667f {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    transform: none !important;
    display: block !important;
    white-space: normal !important;
    width: 100%;
  }

  .gb-headline-2e093498 {
    text-align: center;
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    line-height: 1.2;
    margin: 0 auto;
  }

  .gb-headline-3a1e667f {
    text-align: center;
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    line-height: 1.3;
    margin: 0 auto;
    max-width: 28ch;
  }
}
