/* =====================================================
   FONTS
===================================================== */

@font-face {
  font-family: 'HattonBold';
  src: url('fonts/Hatton-Bold.otf') format('opentype');
}

@font-face {
  font-family: 'HattonLight';
  src: url('fonts/Hatton-Light.otf') format('opentype');
}

@font-face {
  font-family: 'HattonMedium';
  src: url('fonts/Hatton-Medium.otf') format('opentype');
}

@font-face {
  font-family: 'NeueMontreal';
  src: url('fonts/NeueMontreal-Regular.otf') format('opentype');
}

/* =====================================================
   RESET
===================================================== */

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

html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* =====================================================
   PAGE TRANSITION — fade out on navigate
===================================================== */

body {
  background: #fffaf4;
  color: #340059;

  font-family: 'NeueMontreal', sans-serif;

  padding: 3rem;

  position: relative;

  background-image:
    radial-gradient(rgba(52,0,89,0.03) 1px, transparent 1px);

  background-size: 14px 14px;

  animation: fadeIn 0.6s ease both;
}

body.fade-out {
  animation: fadeOut 0.35s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* =====================================================
   ORNAMENTAL FRAME — OPTION A
   Double-rule border (purple outer, teal inner)
   + stained-glass jewel diamonds at corners
===================================================== */

body::before {
  content: "";

  position: fixed;
  inset: 16px;

  border-radius: 48px;

  /* Outer purple rule */
  border: 2px solid rgba(52, 0, 89, 0.55);

  /* Gap then teal inner rule via box-shadow */
  box-shadow:
    inset 0 0 0 5px #fffaf4,
    inset 0 0 0 7px #4a7c6f;

  pointer-events: none;
  z-index: 0;
}



/* =====================================================
   HEADER
===================================================== */

.header {
  text-align: center;
  margin-bottom: 2rem;
  margin-top: 0.5cm;
  position: relative;
  z-index: 2;
}

h1 {
  font-family: 'HattonBold';
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.07em;
  color: #d60036;
}

.subtitle {
  margin-top: 1.1rem;
  font-size: 1.1rem;
  color: #340059;
  opacity: 0.92;
}

/* =====================================================
   COOKIE BUTTON
   (UNTOUCHED — do not modify)
===================================================== */

.cookie-button {
  position: absolute;
  top: 1rem;
  right: 1.8rem;

  width: 130px;
  height: 130px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;

  z-index: 20;

  transform: rotate(6deg);
  animation: floaty 4s ease-in-out infinite;
}

/* =====================================================
   COOKIE JAR TEXT — CHANGE 1:
   NeueMontreal font with cream (#fffaf4) outline
===================================================== */

.cookie-button span.cookie-text {
  font-family: 'HattonMedium', serif;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: #d60036;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 6px));

  -webkit-text-stroke: 0;
  text-stroke: 0;
  text-shadow: none;

  transition: color 0.3s ease, transform 0.3s ease;

  z-index: 10;
}

.cookie-button:hover span.cookie-text {
  color: #340059;
  transform: translate(-50%, calc(-50% + 6px)) scale(1.08);
}

.jar-base,
.jar-lid {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jar-base {
  z-index: 1;
  top: 18px;
}

.jar-lid {
  z-index: 4;
  top: -60px;
  transition: transform 1.25s cubic-bezier(.2,.9,.2,1);
}

.cookie-button:hover .jar-lid {
  transform: rotate(-28deg) translate(-10px, -22px);
}

@keyframes floaty {
  0% { transform: translateY(0px) rotate(6deg); }
  50% { transform: translateY(-6px) rotate(6deg); }
  100% { transform: translateY(0px) rotate(6deg); }
}

/* =====================================================
   GRID
===================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
  position: relative;
  z-index: 2;
}

.card {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 25px 55px rgba(52,0,89,0.10);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: 0.6s ease;
  filter: saturate(0.92) contrast(1.05) brightness(0.96);
}

/* =====================================================
   OVERLAY (GLASS)
===================================================== */

.overlay {
  position: absolute;
  inset: 0;

  background: rgba(184, 184, 255, 0.55);
  backdrop-filter: blur(8px);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  padding: 2rem;

  opacity: 0;
  transition: none;
}

.card:hover .overlay,
.card:focus-within .overlay {
  opacity: 1;
}

.overlay h2 {
  font-family: 'HattonLight';
  font-size: 2.3rem;
  color: white;
  margin-bottom: 0.8rem;
}

.overlay p {
  font-family: 'NeueMontreal', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: white;
}

/* =====================================================
   ABOUT PAGE
===================================================== */

.about-page {
  position: relative;
  z-index: 2;
  margin-top: 4rem;
}

/* About header: standard document flow, same as index */

/* =====================================================
   ABOUT CONTENT LAYOUT — CHANGE 3:
   Portrait LEFT of text, image height matches line-height
===================================================== */

.about-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;

  gap: 3rem;

  max-width: 1500px;
  margin: 0 auto;

  /* top padding clears the normal header */
  padding: 2rem 2rem 4rem;
}

/* Portrait on the LEFT */
.about-portrait {
  flex-shrink: 0;
  position: sticky;
  top: 10rem;
  align-self: flex-start;
  display: flex;
  justify-content: flex-start;

  /* Extra room around the image for the SVG diamond frame */
  padding: 28px;
}

.about-portrait img {
  width: auto;
  height: clamp(160px, 12em, 320px);
  border-radius: 16px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

/* SVG diamond frame sits over the portrait */
.about-portrait svg.portrait-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

/* Text on the RIGHT */
.about-text {
  font-family: 'HattonLight';
  flex: 1;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  background-color: rgba(255, 250, 244, 0.85);
  box-sizing: border-box;
}

.about-text p {
  font-size: 1.6rem;
  line-height: 1.5;
  color: #340059;
  margin-bottom: 2rem;
}

/* DROP CAP */
.about-text p:first-child::first-letter {
  font-size: 5.5rem;
  font-family: 'HattonBold';
  color: #d60036;

  float: left;
  line-height: 0.85;
  padding-right: 12px;
  padding-top: 6px;
}

/* =====================================================
   WINDOW PIE BUTTON
===================================================== */

.window-pie-button {
  position: fixed;
  top: calc(1.2rem + 1cm);
  right: calc(1.8rem + 1cm);

  width: 180px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;

  z-index: 50;

  transition: transform 0.5s ease;
}

.window-pie-button:hover {
  transform: translateY(-6px);
}

.window-pie {
  width: 100%;
  height: auto;
  display: block;
}

.window-pie-button span {
  position: absolute;
  font-family: 'HattonBold';
  font-size: 1.75rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 900px) {

  body {
    padding: 1.5rem;
  }

  /* Shrink and reposition cookie jar so it clears the title */
  .cookie-button {
    width: 90px;
    height: 90px;
    top: auto;
    bottom: -2.5rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(6deg);
    animation: floatyMobile 4s ease-in-out infinite;
  }

  @keyframes floatyMobile {
    0%   { transform: translateX(-50%) translateY(0px) rotate(6deg); }
    50%  { transform: translateX(-50%) translateY(-5px) rotate(6deg); }
    100% { transform: translateX(-50%) translateY(0px) rotate(6deg); }
  }

  .cookie-button span.cookie-text {
    font-size: 1.2rem;
  }

  .grid {
    grid-template-columns: 1fr;
    margin-top: 5rem; /* extra room for the repositioned jar */
  }

  .about-container {
    flex-direction: column;
    padding-top: 2rem;
  }

  /* About portrait: full width on mobile, slight tilt */
  .about-portrait {
    position: static;
    width: 100%;
    justify-content: center;
  }

  .about-portrait img {
    width: 80%;
    height: auto;
    max-height: 320px;
    transform: rotate(-2deg);
  }

  .window-pie-button {
    width: 70px;
  }
}