/* ==========================================================================
   Made in India, Made with Purpose - page styles
   Colours, fonts and spacing are set once in the ":root" block below.
   Change a value there and it updates everywhere on the page.
   ========================================================================== */

/* ---------- 1. COLOURS AND FONTS ---------- */
:root {
  --milk: #F9F7F0;       /* page background */
  --stone: #DBD2C2;      /* gift section background, lines */
  --clay: #B17457;       /* accent colour */
  --graphite: #4A4947;   /* body text, dark section background */
  --deep: #2F2E2C;       /* headings */
  --photo-bg: #DDDAD0;   /* colour shown behind photos while they load */

  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- 2. BASIC RESET AND TYPOGRAPHY ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;   /* keeps headings clear of the fixed header */
}

body {
  overflow-x: clip;
  font-family: var(--sans);
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--graphite);
  background: var(--milk);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  color: var(--deep);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.15;
  margin-bottom: 22px;
}

p + p {
  margin-top: 0.9em;
}

/* ---------- 3. LAYOUT HELPERS ---------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  position: relative;
  padding: clamp(52px, 7vw, 92px) 0;
}

/* Two-column layout used by the Gift, Artifact, Message and Belief sections */
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

/* Frame that holds a photo (square, cropped to fit) */
.photo-frame {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--photo-bg);
}

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

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  padding: 8px 12px;
  background: #fff;
}

/* ---------- 4. HEADER ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(249, 247, 240, 0.9);
  backdrop-filter: blur(8px);
  transition: background 0.4s, box-shadow 0.4s;
}

/* Added by the script once the visitor scrolls down */
.site-header.is-scrolled {
  background: var(--milk);
  box-shadow: 0 1px 0 var(--stone);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo img {
  width: auto;
  height: 38px;
}

.menu {
  display: flex;
  gap: 34px;
  list-style: none;
}

.menu a {
  position: relative;
  padding: 4px 0;
  font-size: 0.95rem;
  color: var(--deep);
  text-decoration: none;
}

/* Thin clay line that slides in under a menu link on hover */
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}

.menu a:hover::after,
.menu a:focus-visible::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  padding: 8px;
  font: inherit;
  color: var(--deep);
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---------- 5. HERO SECTION ---------- */
.hero {
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  animation: rise 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1 .line {
  display: block;
  white-space: nowrap;
}

.hero h1 em {
  color: var(--clay);
  font-style: italic;
}

.hero p {
  max-width: 37.5rem;
  margin-top: 24px;
  animation: rise 1.4s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero .date {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--clay);
  animation: rise 1.4s 0.6s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(36px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Faint decorative mandala behind the Hero, Artifact and Belief sections */
.hero::before,
.artifact::before,
.belief::before {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  background: url("../images/mandala-pattern.webp") center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
}

.hero::before {
  right: -18%;
  top: 50%;
  width: min(110vw, 1000px);
  transform: translateY(-50%);
  animation: spin-centered 240s linear infinite;
}

@keyframes spin-centered {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.artifact,
.belief {
  overflow: hidden;
}

.artifact::before {
  left: -14%;
  bottom: -22%;
  width: min(90vw, 700px);
  opacity: 0.12;
}

.belief::before {
  right: -16%;
  bottom: -24%;
  width: min(95vw, 780px);
  opacity: 0.12;
  animation: spin 300s linear infinite;
}

.hero .container,
.artifact .container,
.belief .container {
  position: relative;
  z-index: 1;
}

/* ---------- 6. GIFT SECTION (text + photo carousel) ---------- */
.gift {
  padding: clamp(80px, 9vw, 128px) 0 clamp(80px, 9vw, 120px);
  background: var(--stone);
}

.gift-text {
  padding-bottom: 22px;
}

.gift h2 {
  margin-bottom: 28px;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.carousel-button {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--deep);
  background: rgba(249, 247, 240, 0.92);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  color: var(--milk);
  background: var(--clay);
}

.carousel-button.previous {
  left: 12px;
}

.carousel-button.next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: #b9ae9b;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.carousel-dots button.is-active {
  background: var(--clay);
  transform: scale(1.3);
}

/* ---------- 7. ARTIFACT SECTION ---------- */
.artifact .two-columns {
  align-items: start;
}

.artifact-tagline {
  margin-top: -6px;
  font-family: var(--serif);
  font-size: clamp(0.9rem, 1.45vw, 1.15rem);
  font-style: italic;
  line-height: 1.35;
  color: var(--clay);
}

/* ---------- 8. MESSAGE SECTION (dark) ---------- */
.message {
  color: var(--milk);
  background: var(--graphite);
}

.message h2 {
  color: var(--milk);
}

.message p {
  max-width: 50ch;
  color: #e8e2d4;
}

/* ---------- 9. BELIEF SECTION ---------- */
.belief-intro {
  margin-bottom: 32px;
}

.belief h2 {
  margin-bottom: 0;
}

.belief-statement {
  align-self: start;
  padding-left: 24px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  line-height: 1.15;
  color: var(--deep);
  border-left: 3px solid var(--clay);
}

.belief-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 22px;
}

.belief-links a {
  color: var(--deep);
  text-decoration-color: var(--clay);
  text-underline-offset: 5px;
}

.belief-links a:hover {
  color: var(--clay);
}

/* ---------- 10. FOOTER ---------- */
.site-footer {
  padding: 44px 0 0;
  font-size: 0.95rem;
  color: #c9d2ea;
  background: linear-gradient(120deg, #0a0f20 0%, #101733 55%, #18204d 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr 1.25fr;
  gap: 40px 36px;
}

.footer-logo {
  display: inline-block;
  padding: 8px 14px;
  background: #fff;
  border-radius: 10px;
}

.footer-logo img {
  width: auto;
  height: 34px;
}

.footer-about {
  max-width: 30ch;
  margin: 18px 0;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.footer-social a {
  font-weight: 700;
  color: #dbe3fa;
}

.site-footer h3 {
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}

.site-footer ul {
  list-style: none;
}

.site-footer li + li {
  margin-top: 12px;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.25s;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-contact address {
  font-style: normal;
}

.footer-contact p {
  max-width: 30ch;
  line-height: 1.65;
}

.footer-contact p + p,
.footer-contact address + p {
  margin-top: 12px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding: 22px 0;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom div {
  display: flex;
  gap: 22px;
}

/* ---------- 11. FADE-IN WHILE SCROLLING ----------
   The script adds "reveal-ready" to the page, so without JavaScript everything stays visible.
   To switch an effect off for one block, delete its data-reveal attribute in the HTML. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-ready [data-reveal="image"] {
  transform: translateY(34px) scale(0.98);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 12. TABLET AND MOBILE ---------- */
@media (min-width: 901px) {
  .artifact-tagline {
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .two-columns {
    grid-template-columns: 1fr;
  }

  .gift-text {
    padding-bottom: 0;
  }

  .carousel {
    margin: 0 auto;
  }

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

  .footer-brand,
  .footer-contact {
    grid-column: span 3;
  }
}

@media (max-width: 760px) {
  .menu-button {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--milk);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }

  .menu.is-open {
    display: flex;
  }

  .menu a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--stone);
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
