/* Maine Mama Bakes — cozy cabin kitchen in the Maine mountains, mobile first */

:root {
  --cream: #F7F1E6;
  --cream-deep: #E8DCC8;
  --paper: #FFF9F0;
  --wood: #4A2C1A;
  --wood-soft: #6B4228;
  --ink: #3E2A1F;
  --muted: #6A5346;
  --red: #8E1D1F;
  --red-hover: #6F1517;
  --rule: #CDB89A;
  --gingham-red: rgba(142, 29, 31, 0.22);
  --shadow: 0 10px 28px rgba(74, 44, 26, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
}

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

a {
  color: var(--red);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--wood);
  color: var(--cream);
  padding: 0.5rem 0.9rem;
  border-radius: 0.3rem;
  z-index: 20;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ----- Hero ----- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 36.5rem;
  color: #F7F1E6;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(28, 16, 10, 0.2) 0%, rgba(28, 16, 10, 0.55) 70%),
    linear-gradient(to bottom, rgba(28, 16, 10, 0.12) 0%, rgba(28, 16, 10, 0.28) 42%, rgba(28, 16, 10, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.25rem 1.35rem;
}

.logo {
  width: 176px;
  height: 176px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(247, 241, 230, 0.28);
}

.eyebrow {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #F3E6C8;
}

h1,
h2 {
  font-family: "Great Vibes", "Segoe Script", cursive;
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(2.8rem, 12vw, 4.8rem);
  color: #F7F1E6;
  text-shadow: 0 2px 18px rgba(28, 16, 10, 0.45);
}

.hero .tagline {
  margin: 0 auto;
  max-width: 22rem;
  font-family: Lora, Georgia, serif;
  font-style: italic;
  font-size: 1.08rem;
  color: #EDE0CC;
  text-shadow: 0 1px 10px rgba(28, 16, 10, 0.5);
}

.hero-mountains,
.ridge {
  pointer-events: none;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}

.hero-mountains {
  position: relative;
  z-index: 2;
  height: 5.5rem;
  margin-bottom: -1px;
  background-color: var(--cream);
  -webkit-mask-image: url("assets/mountains-hero.svg");
  mask-image: url("assets/mountains-hero.svg");
  -webkit-mask-position: bottom;
  mask-position: bottom;
  -webkit-mask-size: auto 5.5rem;
  mask-size: auto 5.5rem;
}

.ridge-wood {
  height: 4.75rem;
  margin: 0.15rem 0 0.35rem;
  background-color: var(--wood);
  -webkit-mask-image: url("assets/mountains-divider.svg");
  mask-image: url("assets/mountains-divider.svg");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: auto 4.75rem;
  mask-size: auto 4.75rem;
  opacity: 0.88;
}

/* ----- Page sections ----- */

.section {
  width: min(38rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.75rem 0;
  text-align: center;
}

.section p {
  margin: 0;
}

.oven {
  width: min(72rem, 100%);
  padding-left: 0;
  padding-right: 0;
}

.oven .intro,
.oven h2 {
  width: min(38rem, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.oven .rule {
  margin-left: auto;
  margin-right: auto;
}

.oven .intro {
  margin-bottom: 1.25rem;
}

.card {
  background:
    var(--paper)
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(142, 29, 31, 0.025) 10px,
      rgba(142, 29, 31, 0.025) 11px
    );
  border: 1px solid var(--cream-deep);
  border-radius: 1rem;
  padding: 1.75rem 1.35rem;
  box-shadow: var(--shadow);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 0.7rem;
  border: 1px dashed rgba(142, 29, 31, 0.22);
  pointer-events: none;
}

h2 {
  margin: 0;
  font-size: clamp(2.15rem, 8vw, 3rem);
  color: var(--wood);
}

.rule {
  width: 4.5rem;
  height: 2px;
  margin: 0.7rem auto 1rem;
  background: var(--red);
  position: relative;
}

.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ----- Bake gallery ----- */

.bake-strip {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(70%, 17.5rem);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.25rem;
  padding: 0.15rem 1.25rem 1.1rem;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.bake-strip li {
  scroll-snap-align: start;
}

.bake-strip figure {
  margin: 0;
  background: var(--wood);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid var(--wood);
}

.bake-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.bake-strip figcaption {
  margin: 0;
  padding: 0.55rem 0.6rem 0.7rem;
  font-family: Lora, Georgia, serif;
  font-style: italic;
  font-size: 0.98rem;
  color: #F3E6C8;
  background:
    repeating-linear-gradient(
      90deg,
      #5a3320 0 8px,
      #4a2c1a 8px 16px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(243, 230, 200, 0.08) 0 8px,
      transparent 8px 16px
    );
  background-blend-mode: multiply;
  background-color: var(--wood);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: 2px solid var(--red);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: #fff;
}

.btn-placeholder {
  background: transparent;
  color: var(--muted);
  border: 2px dashed var(--rule);
  pointer-events: none;
}

.email {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.gingham-band {
  height: 14px;
  background-color: #F3E6C8;
  background-image:
    repeating-linear-gradient(90deg, var(--gingham-red) 0 8px, transparent 8px 16px),
    repeating-linear-gradient(0deg, var(--gingham-red) 0 8px, transparent 8px 16px);
  border-top: 1px solid var(--cream-deep);
}

.footer {
  padding: 1.45rem 1.25rem 1.7rem;
  background:
    linear-gradient(to bottom, #5a3320, var(--wood) 40%);
  color: #F3E6C8;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .hero {
    min-height: 42rem;
  }

  .hero-content {
    padding: 4.5rem 1.5rem 1.6rem;
  }

  .logo {
    width: 228px;
    height: 228px;
  }

  .hero .tagline {
    max-width: 40rem;
    font-size: 1.2rem;
  }

  .hero-media img {
    object-position: center 50%;
  }

  .section {
    padding: 2.15rem 0;
  }

  .card {
    padding: 2.25rem 2rem;
  }
}

@media (min-width: 960px) {
  .bake-strip {
    display: grid;
    grid-auto-flow: unset;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
    max-width: min(72rem, calc(100% - 3rem));
    margin-inline: auto;
    padding: 0.35rem 0 0.5rem;
    gap: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
