/* ==========================================================
   Azucaramelo — Stylesheet
   Minimalistic · Sophisticated · Warm
   ========================================================== */

/* --- Design Tokens --- */
:root {
  --color-bg:           #FDF8F3;
  --color-text:         #3D2C2C;
  --color-text-muted:   #7A6565;
  --color-accent:       #C4956A;
  --color-accent-hover: #B07F55;
  --color-secondary:    #C9A9A6;
  --color-card:         #FFFFFF;
  --color-border:       #E8DDD3;
  --color-hero-overlay: rgba(253, 248, 243, 0.85);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  --max-width:   1100px;
  --nav-height:  68px;
  --radius:      12px;
  --radius-sm:   6px;
  --transition:  0.25s ease;

  --shadow-card:       0 2px 16px rgba(61, 44, 44, 0.06);
  --shadow-card-hover: 0 6px 24px rgba(61, 44, 44, 0.10);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ==========================================================
   Navigation
   ========================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 36px;
  width: auto;
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: all var(--transition);
}

.nav__link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* --- Toggle Button (shared for language & unit) --- */
.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  transition: border-color var(--transition);
}

.toggle-btn:hover {
  border-color: var(--color-accent);
}

.toggle-btn__option {
  transition: color var(--transition), font-weight var(--transition);
  cursor: pointer;
}

.toggle-btn__option--active {
  color: var(--color-accent);
  font-weight: 700;
}

.toggle-btn__divider {
  color: var(--color-border);
  user-select: none;
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(196, 149, 106, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 169, 166, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(196, 149, 106, 0.07) 0%, transparent 60%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(196, 149, 106, 0.03) 40px,
      rgba(196, 149, 106, 0.03) 41px
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: var(--space-2xl) var(--space-lg);
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: inline-block;
  background: var(--color-accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 36px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(196, 149, 106, 0.25);
}

.hero__cta:hover {
  background: var(--color-accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196, 149, 106, 0.35);
}

/* ==========================================================
   Ad Slots
   ========================================================== */
.ad-slot {
  max-width: var(--max-width);
  margin: var(--space-lg) auto;
  padding: 0 var(--space-lg);
}

.ad-slot__inner {
  background: var(--color-card);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-border);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ad-slot--rectangle .ad-slot__inner {
  max-width: 336px;
  min-height: 280px;
  margin: 0 auto;
}

/* ==========================================================
   Featured Recipes
   ========================================================== */
.featured {
  padding: var(--space-2xl) 0;
}

.featured__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.featured__header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--space-sm);
}

.featured__header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* --- Recipe Card --- */
.recipe-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recipe-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.recipe-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: var(--color-bg);
}

.recipe-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card:hover .recipe-card__image img {
  transform: scale(1.04);
}

.recipe-card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.recipe-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  flex: 1;
}

.recipe-card__meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.recipe-card__meta span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-secondary);
  margin-right: 6px;
  vertical-align: middle;
}

.recipe-card__btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  padding: 8px 24px;
  transition: all var(--transition);
}

.recipe-card__btn:hover {
  background: var(--color-accent);
  color: #FFFFFF;
}

/* ==========================================================
   Interactive Recipe Showcase
   ========================================================== */
.showcase {
  padding: var(--space-2xl) 0;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* --- Showcase hero image --- */
.showcase__hero-image {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  background: var(--color-bg);
}

.showcase__hero-image img {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: cover;
}

.showcase__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.showcase__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--space-sm);
}

.showcase__desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Controls bar --- */
.showcase__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.control-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.control-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* --- Yield buttons --- */
.yield-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  transition: all var(--transition);
}

.yield-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.yield-display {
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 100px;
  text-align: center;
  color: var(--color-text);
}

/* --- Two-column recipe body --- */
.showcase__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.showcase__ingredients h3,
.showcase__steps h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

/* --- Ingredients list --- */
.ingredient-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 221, 211, 0.5);
  font-size: 0.95rem;
  flex-wrap: wrap;
  gap: 3px;
}

.ingredient-item:last-child {
  border-bottom: none;
}

.ing-amount {
  font-weight: 700;
  color: var(--color-accent);
  border-bottom: 1px dashed var(--color-accent);
  cursor: text;
  padding: 0 3px;
  min-width: 2ch;
  display: inline-block;
  transition: background var(--transition);
  border-radius: 2px;
  outline: none;
}

.ing-amount:hover {
  background: rgba(196, 149, 106, 0.08);
}

.ing-amount:focus {
  background: rgba(196, 149, 106, 0.14);
  border-bottom-style: solid;
}

.ing-amount[contenteditable="false"] {
  cursor: default;
  border-bottom-style: none;
  color: var(--color-text);
}

.ing-unit {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-right: 4px;
}

.ing-name {
  color: var(--color-text);
}

.ing-unit-toggle {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 2px 7px;
  margin-left: auto;
  transition: all var(--transition);
  background: transparent;
  white-space: nowrap;
}

.ing-unit-toggle:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(196, 149, 106, 0.06);
}

.ing-not-scalable {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-left: auto;
}

/* --- Steps --- */
.showcase__steps ol {
  list-style: none;
  counter-reset: step-counter;
}

.step-item {
  counter-increment: step-counter;
  position: relative;
  padding: var(--space-md) 0 var(--space-md) 48px;
  border-bottom: 1px solid rgba(232, 221, 211, 0.5);
  font-size: 0.95rem;
  line-height: 1.7;
}

.step-item:last-child {
  border-bottom: none;
}

.step-item::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: var(--space-md);
  width: 32px;
  height: 32px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ==========================================================
   About
   ========================================================== */
.about {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.about h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--space-md);
}

.about p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ==========================================================
   Footer
   ========================================================== */
.footer {
  background: var(--color-text);
  color: rgba(253, 248, 243, 0.7);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-bg);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
  font-size: 0.85rem;
}

.footer__links a {
  color: rgba(253, 248, 243, 0.6);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--color-accent);
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(253, 248, 243, 0.4);
  margin-top: var(--space-sm);
}

/* ==========================================================
   Noscript
   ========================================================== */
.noscript-msg {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ==========================================================
   Utility
   ========================================================== */
.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
   ========================================================== */
@media (min-width: 768px) {
  .showcase__body {
    grid-template-columns: 2fr 3fr;
  }
}

@media (max-width: 640px) {
  .nav__inner {
    padding: 0 var(--space-md);
  }

  .hero__content {
    padding: var(--space-xl) var(--space-md);
  }

  .container {
    padding: 0 var(--space-md);
  }

  .featured {
    padding: var(--space-xl) 0;
  }

  .showcase {
    padding: var(--space-xl) 0;
  }

  .showcase__controls {
    flex-direction: column;
    gap: var(--space-md);
  }

  .about {
    padding: var(--space-xl) 0;
  }

  .ad-slot {
    padding: 0 var(--space-md);
  }
}
