/* =========================================
   Kara's Bakery — Main Stylesheet
   ========================================= */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Variables */
:root {
  --black:       #0D0D0D;
  --white:       #FFFFFF;
  --off-white:   #F9F7F5;
  --red:         #C41230;
  --red-dark:    #9B0E27;
  --gray-light:  #EBEBEB;
  --gray-mid:    #888888;
  --gray-dark:   #3A3A3A;

  --font-script: 'Great Vibes', cursive;
  --font-serif:  'Dancing Script', cursive;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width:   1200px;
  --nav-height:  72px;
  --section-pad: 5rem 1.5rem;
}

/* Base */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(3rem, 7vw, 5.5rem); font-family: var(--font-script); font-weight: 400; line-height: 1.1; }
h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 2.8vw, 1.65rem); }

p { max-width: 65ch; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: var(--section-pad); }
.section--off-white { background: var(--off-white); }

.label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn--red          { background: var(--red);   color: var(--white); }
.btn--red:hover    { background: var(--red-dark); }

.btn--outline      { background: transparent; color: var(--white); border: 1.5px solid var(--white); }
.btn--outline:hover { background: var(--white); color: var(--black); }

.btn--outline-dark       { background: transparent; color: var(--black); border: 1.5px solid var(--black); }
.btn--outline-dark:hover { background: var(--black); color: var(--white); }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

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

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

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

.nav__logo-text {
  font-family: var(--font-script);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--black);
}

.nav__logo-text span { color: var(--red); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-dark);
  position: relative;
  transition: color 0.2s;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav__links a:hover,
.nav__links a.active          { color: var(--black); }
.nav__links a:hover::after,
.nav__links a.active::after   { transform: scaleX(1); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--black);
  transition: all 0.3s ease;
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  padding: 1.5rem;
  z-index: 999;
}

.nav__mobile.open { display: block; }

.nav__mobile ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }

.nav__mobile a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-dark);
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-light);
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  margin-top: var(--nav-height);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  background: var(--off-white);
  border-bottom: 1px solid var(--gray-light);
}

.page-hero h1 { margin-bottom: 0.75rem; }

.page-hero p {
  margin: 0 auto;
  color: var(--gray-mid);
  font-size: 1.05rem;
}

/* ---- HOME: Hero ---- */
.hero {
  margin-top: var(--nav-height);
  height: calc(90vh - var(--nav-height));
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.45;
}

.hero__content {
  position: relative;
  text-align: center;
  color: var(--white);
  padding: 0 1.5rem;
  max-width: 800px;
}

.hero__eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.hero__title { color: var(--white); margin-bottom: 1.25rem; }

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 52ch;
  margin: 0 auto 2.25rem;
}

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

/* ---- HOME: Categories ---- */
.categories { padding: var(--section-pad); }

.categories__header {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

.categories__header .label { margin-bottom: 0.75rem; }

.categories__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 480px));
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  justify-content: center;
}

.category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--gray-dark);
  cursor: pointer;
  display: block;
}

.category-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-card__img { transform: scale(1.04); }

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

.category-card__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.category-card__name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 0.9rem;
}

.category-card__link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s, color 0.2s;
}

.category-card:hover .category-card__link { gap: 0.85rem; color: var(--white); }

/* ---- HOME: About Snippet ---- */
.about-snippet { padding: var(--section-pad); background: var(--off-white); }

.about-snippet__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-snippet__label { margin-bottom: 1rem; }

.about-snippet__text h2  { margin-bottom: 1.25rem; }

.about-snippet__text p {
  color: var(--gray-dark);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.about-snippet__image { position: relative; }

.about-snippet__image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--gray-light);
  min-height: 300px;
}

.about-snippet__image::before {
  content: '';
  position: absolute;
  top: 1.5rem; left: -1.5rem;
  right: 1.5rem; bottom: -1.5rem;
  border: 2px solid var(--red);
  z-index: -1;
}

/* ---- HOME: CTA Banner ---- */
.cta-banner {
  padding: 5.5rem 1.5rem;
  background: var(--black);
  text-align: center;
  color: var(--white);
}

.cta-banner h2 { margin-bottom: 0.75rem; }

.cta-banner p {
  color: rgba(255,255,255,0.6);
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ---- MENU PAGE ---- */
.menu-section { padding: var(--section-pad); }
.menu-section:nth-child(even) { background: var(--off-white); }

.menu-section__header {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-light);
}

.menu-section__header h2 { flex: 1; }

.menu-section__header p {
  color: var(--gray-mid);
  font-size: 0.9rem;
  max-width: 38ch;
  text-align: right;
}

.menu-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2rem;
}

.menu-item {
  background: var(--white);
  border: 1px solid var(--gray-light);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.09);
}

.menu-item__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--gray-light);
  min-height: 180px;
}

.menu-item__body { padding: 1.25rem; }

.menu-item__name { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 0.4rem; }

.menu-item__desc {
  font-size: 0.875rem;
  color: var(--gray-mid);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.menu-item__note {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.order-note {
  padding: 3.5rem 1.5rem;
  background: var(--black);
  text-align: center;
  color: var(--white);
}

.order-note h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }

.order-note p { margin: 0 auto 1.75rem; color: rgba(255,255,255,0.6); }

/* ---- ABOUT PAGE ---- */
.about-story__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-story__content .label { margin-bottom: 1rem; }
.about-story__content h2     { margin-bottom: 1.5rem; }

.about-story__content p {
  color: var(--gray-dark);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-story__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-story__images img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--gray-light);
  min-height: 150px;
}

.about-story__images img:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

/* Values */
.values__header { text-align: center; margin: 0 auto 3rem; }
.values__header .label { margin-bottom: 0.75rem; }

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.value-item { text-align: center; }

.value-item__icon {
  width: 52px; height: 52px;
  margin: 0 auto 1.25rem;
  border: 1.5px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-item h3    { margin-bottom: 0.5rem; font-size: 1.1rem; }
.value-item p     { font-size: 0.9rem; color: var(--gray-mid); line-height: 1.75; margin: 0 auto; }

/* ---- CONTACT PAGE ---- */
.contact-section__inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.contact-info .label { margin-bottom: 0.75rem; }
.contact-info h2     { margin-bottom: 1.25rem; font-size: 1.9rem; }

.contact-info p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-info__details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info__details li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-dark);
  line-height: 1.5;
}

.detail-label { font-weight: 600; min-width: 70px; color: var(--black); flex-shrink: 0; }

.socials { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.socials a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-dark);
  transition: color 0.2s;
}

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

/* Form */
.contact-form { background: var(--off-white); padding: 2.5rem; }

.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--red); }

.form-group textarea { min-height: 140px; resize: vertical; }

.form-group select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-submit { width: 100%; }

.form-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--gray-mid);
  text-align: center;
}

/* ---- Footer ---- */
.footer { background: var(--black); color: var(--white); padding: 4rem 1.5rem 2rem; }

.footer__inner { max-width: var(--max-width); margin: 0 auto; }

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer__brand .brand-name {
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.footer__brand .brand-name span { color: var(--red); }

.footer__brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 34ch;
}

.footer__col h4 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.footer__col ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer__col ul a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav__links    { display: none; }
  .nav__hamburger { display: flex; }

  .categories__grid { grid-template-columns: 1fr; gap: 1rem; }
  .category-card    { aspect-ratio: 16/9; }

  .about-snippet__inner,
  .about-story__inner,
  .contact-section__inner { grid-template-columns: 1fr; gap: 2.5rem; }

  .about-snippet__image::before { display: none; }

  .values__grid { grid-template-columns: 1fr; gap: 2rem; }

  .footer__top   { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 600px) {
  :root { --section-pad: 3.5rem 1.25rem; }

  .hero { height: 85vh; }

  .menu-section__header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .menu-section__header p { text-align: left; }

  .contact-form { padding: 1.5rem; }

  .about-story__images { grid-template-columns: 1fr; }
  .about-story__images img:first-child { grid-column: span 1; }
}
