:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f4fb;
  --text: #09101d;
  --muted: #5f6d7e;
  --accent: #1b6dff;
  --accent-soft: #d8e6ff;
  --border: #dbe5f0;
  --shadow: 0 20px 60px rgba(16, 34, 64, 0.08);
}

* {
  box-sizing: border-box;
  cursor: crosshair;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: transparent;
  color: var(--text);
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  height: 100%;
}

.page-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('img/anime2.png');
  background-size: auto;
  background-position: center top;
  background-repeat: repeat;
  background-attachment: fixed;
  background-color: #000000;
  filter: brightness(0.75) saturate(1.05);
  z-index: -2;
  transition: background-image 0.8s ease;
}

.page-bg::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #1b6dff 0deg,
    #1b6dff 30deg,
    transparent 30deg,
    transparent 60deg,
    #1b6dff 60deg,
    #1b6dff 90deg,
    transparent 90deg,
    transparent 120deg,
    #1b6dff 120deg,
    #1b6dff 150deg,
    transparent 150deg,
    transparent 180deg,
    #1b6dff 180deg,
    #1b6dff 210deg,
    transparent 210deg,
    transparent 240deg,
    #1b6dff 240deg,
    #1b6dff 270deg,
    transparent 270deg,
    transparent 300deg,
    #1b6dff 300deg,
    #1b6dff 330deg,
    transparent 330deg,
    transparent 360deg
  );
  opacity: 0.15;
  animation: spiralRotate 20s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@keyframes spiralRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(27, 109, 255, 0.08) 1px, transparent 1px),
    linear-gradient(225deg, rgba(255, 77, 149, 0.06) 2px, transparent 2px);
  background-size: 80px 80px;
  opacity: 0.4;
  pointer-events: none;
  animation: drift 18s linear infinite;
  z-index: -1;
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 80px 80px; }
}

header.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  justify-items: center;
  padding: 2rem 2rem 1.5rem;
  max-width: 686px;
  margin: 2rem auto 0;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(3px);
}

.hero-copy {
  display: grid;
  gap: 1.25rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  overflow: hidden;
  white-space: nowrap;
}

.hero h1 span {
  display: inline-block;
  animation: scrollText 10s linear infinite;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.filter-button {
  border: 1px solid transparent;
  background: rgba(240, 244, 251, 1.0);
  color: var(--text);
  padding: 0.5rem 0.5rem;
  border-radius: 20px;
  cursor: pointer;
  /* font-weight: 700; */
  font-size: 1.5em;
  letter-spacing: 0.02em;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  font-style: italic;
}

.filter-button:hover {
  transform: translateY(-1px);
  background: #e7efff;
}

.filter-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

main {
  padding: 1.5rem 2rem 2.5rem;
  max-width: 686px;
  margin: 0 auto;
}

.hero-visual {
  align-self: stretch;
  min-height: 300px;
  display: grid;
  place-items: center;
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(16, 34, 64, 0.15);
  border: 1px solid var(--border);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-visual img.active {
  opacity: 1;
}

.recipe-grid {
  display: grid;
  gap: 1rem;
}

.recipe-card {
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  cursor: grab;
}

.recipe-card h2 {
  margin: 0 0 0.45rem;
  font-size: 2rem;
  line-height: 1.05;
}

.recipe-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 2rem;
}

.recipe-card small {
  display: block;
  color: var(--muted);
  font-size: 1.5rem;
}

.recipe-detail {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.recipe-detail h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.recipe-detail h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.recipe-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 1.2rem;
  font-weight: bold;
}

.back-link {
  margin-top: 2rem;
  text-align: center;
}

.back-link a {
  color: var(--accent);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.recipe-section {
  margin-bottom: 3rem;
}

.ingredients-showcase {
  width: 100%;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.full-width-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.product-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.step-item:hover {
  transform: scale(1.05);
}

.step-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.section-textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  resize: vertical;
  background: rgba(255, 255, 255, 0.95);
}

.product-textarea {
  width: 100%;
  min-height: 80px;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  resize: vertical;
  background: rgba(255, 255, 255, 0.95);
}

.step-textarea {
  width: 100%;
  min-height: 70px;
  margin-top: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  background: rgba(255, 255, 255, 0.95);
}

textarea::placeholder {
  color: var(--muted);
}

.label {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 1rem 0 2rem;
  max-width: 980px;
  margin: 0 auto;
}

@media (max-width: 820px) {
  header.hero {
    margin: 1.25rem 1rem 0;
    padding: 1.75rem 1.25rem 1.25rem;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 9vw, 3.8rem);
  }

  main {
    padding: 1.25rem 1rem 2rem;
  }
}

@media (max-width: 620px) {
  .filters {
    justify-content: center;
  }

  .filter-button {
    width: 100%;
    text-align: center;
  }

  .recipe-card {
    padding: 1.25rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.recipe-card {
  background: rgba(255, 255, 255, 0.1); /* lower = more transparent */
}

.hero h1,
.recipe-card h2,
.recipe-card p,
.recipe-card small,
.label {
  color: black;
  background: white;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}