/* ==========================================================================
   The Best Caesar - Marketing Website Styles
   ========================================================================== */

/* Font Faces
   ========================================================================== */

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Italic-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* CSS Custom Properties
   ========================================================================== */

:root {
  --color-background: #1A1810;
  --color-deep-dark: #111111;
  --color-marble: #F5F2EE;
  --color-white: #FFFFFF;
  --color-sand: #B0A898;
  --color-sand-light: #C0B8A8;
  --color-stone: #9A9080;
  --color-warm-beige: #EAE7E2;
  --color-warm-black: #3A3828;
  --color-warm-gray: #5A5848;
  --font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --content-max-width: 1200px;
  --page-padding: 24px;
  --section-padding-desktop: 140px;
  --section-padding-mobile: 90px;
}

/* Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Base Styles
   ========================================================================== */

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  background-color: var(--color-background);
  color: var(--color-marble);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes
   ========================================================================== */

.section-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-sand);
  margin-bottom: 24px;
}

.section-heading {
  font-weight: 500;
  font-size: 36px;
  color: var(--color-white);
  margin-bottom: 24px;
}

.section-body {
  color: var(--color-sand);
  max-width: 640px;
  line-height: 1.7;
}

.content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.section {
  padding: var(--section-padding-desktop) 0;
}

/* Responsive
   ========================================================================== */

/* Hero
   ========================================================================== */

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-deep-dark) url('../img/hero.jpg') center/cover no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.45) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--page-padding);
}

.hero__title {
  font-weight: 500;
  font-size: 56px;
  color: white;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero__title-accent {
  font-size: 56px;
  color: white;
  text-transform: none;
  letter-spacing: 2px;
}

.hero__subtitle {
  color: #fff;
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.hero__app-store {
  display: inline-block;
  margin-top: 50px;
}

.hero__app-store img {
  display: block;
  margin: 0 auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.hero__app-store img:hover {
  opacity: 1;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.6s;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--color-sand);
  opacity: 0.6;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.6); opacity: 0.3; }
}

/* App Showcase
   ========================================================================== */

.app-showcase {
  background: var(--color-deep-dark);
}

.app-showcase .section-body {
  margin-bottom: 48px;
}

.app-showcase__screenshots {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 48px;
}

.app-showcase__phone {
  width: 280px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.app-showcase__phone:nth-child(2) {
  transform: translateY(-20px);
}

.app-store-badge {
  display: block;
  text-align: center;
}

.app-store-badge img {
  display: inline-block;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.app-store-badge img:hover {
  opacity: 1;
}

/* Recipe
   ========================================================================== */

.recipe__serving-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.recipe__serving-label {
  color: var(--color-stone);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 500;
}

.recipe__serving-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-warm-black);
  background: transparent;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.recipe__serving-btn:hover {
  border-color: var(--color-sand);
}

.recipe__serving-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.recipe__serving-count {
  font-weight: 500;
  font-size: 24px;
  min-width: 32px;
  text-align: center;
  color: white;
}

.recipe__ingredients {
  list-style: none;
  max-width: 640px;
}

.recipe__ingredient {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-warm-black);
}

.recipe__ingredient-name {
  color: var(--color-marble);
  display: block;
}

.recipe__ingredient-note {
  color: var(--color-sand);
  font-style: italic;
  font-size: 14px;
  display: block;
  margin-top: 4px;
}

.recipe__ingredient-qty {
  color: var(--color-stone);
  white-space: nowrap;
  text-align: right;
  padding-left: 24px;
}

.recipe__photo-divider {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 400px;
  overflow: hidden;
  margin-top: 80px;
  margin-bottom: 80px;
}

.recipe__photo-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe__photo-divider--hero {
  height: 100vh;
  margin-bottom: 0;
}

.recipe {
  padding-bottom: 0 !important;
}

.recipe__steps {
  list-style: none;
  max-width: 640px;
}

.recipe__step {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-warm-black);
}

.recipe__step-number {
  font-weight: 500;
  font-size: 14px;
  color: var(--color-sand);
  min-width: 28px;
  flex-shrink: 0;
}

.recipe__step-title {
  font-weight: 500;
  color: white;
  font-size: 20px;
  margin-bottom: 8px;
}

.recipe__step-instruction {
  color: var(--color-marble);
  line-height: 1.7;
}

/* Story
   ========================================================================== */

.story {
  background: var(--color-deep-dark);
}

.story__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.story__photo img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.story__body {
  color: var(--color-marble);
  line-height: 1.7;
  margin-bottom: 20px;
}

.story__pullquote {
  border-left: 2px solid var(--color-sand);
  padding-left: 24px;
  margin-top: 40px;
}

.story__pullquote p {
  font-size: 24px;
  font-style: italic;
  color: white;
  line-height: 1.4;
}

.story__pullquote cite {
  display: block;
  margin-top: 12px;
  color: var(--color-sand);
  font-style: normal;
  font-size: 14px;
}

/* Testimonials
   ========================================================================== */

.testimonials {
  min-height: 400px;
  display: flex;
  align-items: center;
}

.testimonials .content-wrapper {
  width: 100%;
}

.testimonials__container {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.testimonials__quote {
  position: absolute;
  opacity: 0;
  transition: opacity 1s ease;
  width: 100%;
  max-width: 800px;
  padding: 0 var(--page-padding);
}

.testimonials__quote--active {
  opacity: 1;
}

.testimonials__quote p {
  font-size: 30px;
  line-height: 1.5;
  color: white;
  font-weight: 400;
}

.testimonials__quote cite {
  display: block;
  margin-top: 16px;
  color: var(--color-sand);
  font-size: 14px;
  font-style: normal;
  letter-spacing: 1px;
}

/* Community
   ========================================================================== */

.community__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.community__photo {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-warm-black);
}

.community__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community__cta {
  text-align: center;
  margin-top: 48px;
}

.community__cta-text {
  font-size: 24px;
  font-weight: 500;
  color: white;
  margin-bottom: 12px;
}

.community__instagram {
  color: var(--color-sand);
  text-decoration: none;
  font-size: 16px;
}

.community__instagram:hover {
  text-decoration: underline;
}

.community__hashtag {
  color: var(--color-stone);
  font-size: 16px;
  margin-left: 8px;
}

/* Footer
   ========================================================================== */

.footer {
  background: var(--color-deep-dark);
  padding: 80px 0 40px;
}

.footer__content {
  text-align: center;
}

.footer__logo {
  width: 120px;
  margin: 0 auto 32px;
}

.footer__app-store {
  display: inline-block;
  margin-bottom: 32px;
}

.footer__app-store img {
  opacity: 0.85;
  transition: opacity 0.3s;
}

.footer__app-store img:hover {
  opacity: 1;
}

.footer__links {
  margin-bottom: 24px;
}

.footer__links a {
  color: var(--color-sand);
  text-decoration: none;
  font-size: 14px;
}

.footer__links a:hover {
  text-decoration: underline;
}

.footer__credits {
  color: var(--color-stone);
  font-size: 14px;
  margin-top: 24px;
}

.footer__credits a {
  color: var(--color-sand);
  text-decoration: none;
}

.footer__credits a:hover {
  text-decoration: underline;
}

.footer__credits p {
  margin-bottom: 4px;
}

.footer__legal {
  color: var(--color-warm-gray);
  font-size: 12px;
  margin-top: 32px;
}

.footer__disclaimer {
  font-size: 11px;
  max-width: 480px;
  margin: 12px auto 0;
  line-height: 1.5;
}

/* Responsive — Tablet
   ========================================================================== */

@media (max-width: 1024px) {
  .community__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive — Mobile
   ========================================================================== */

@media (max-width: 768px) {
  .section-heading {
    font-size: 28px;
  }

  .section {
    padding: var(--section-padding-mobile) 0;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__title-accent {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .app-showcase__screenshots {
    flex-wrap: wrap;
  }

  .app-showcase__phone {
    width: 200px;
  }

  .recipe__photo-divider {
    height: 250px;
  }

  .recipe__photo-divider--hero {
    height: 100vh;
  }

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

  .story__pullquote p {
    font-size: 20px;
  }

  .testimonials__quote p {
    font-size: 22px;
  }

  .community__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-marble);
  color: var(--color-background);
  padding: 8px 16px;
  z-index: 1000;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--color-sand);
  outline-offset: 4px;
}

/* Print
   ========================================================================== */

@media print {
  .hero,
  .app-showcase,
  .story,
  .testimonials,
  .community,
  .footer,
  .hero__scroll-indicator,
  .recipe__serving-selector,
  .recipe__photo-divider,
  .skip-link {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .recipe {
    padding: 0;
  }

  .section-label {
    color: #666;
  }

  .section-heading {
    color: black;
  }

  .recipe__ingredient-name {
    color: black;
  }

  .recipe__ingredient-qty {
    color: #333;
  }

  .recipe__ingredient-note {
    color: #666;
  }

  .recipe__ingredient {
    border-bottom-color: #ccc;
  }

  .recipe__step-number {
    color: #999;
  }

  .recipe__step-title {
    color: black;
  }

  .recipe__step-instruction {
    color: #333;
  }

  .recipe__step {
    page-break-inside: avoid;
  }

  .recipe::before {
    content: 'The Best Caesar — Recipe';
    display: block;
    font-size: 18pt;
    font-weight: 500;
    margin-bottom: 24pt;
    text-align: center;
  }

  a[href]::after {
    content: none;
  }
}
