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

:root {
  --indigo: oklch(23% 0.06 278);
  --terracotta: oklch(57% 0.13 36);
  --almost-black: #202022;
  --almost-white: #fbfbfa;
  --almost-white-rgb: 251, 251, 250;
  --indigo-light: oklch(26% 0.06 278);
  --font-serif: 'EB Garamond', 'Garamond', serif;
  --font-sans: 'Inter', Helvetica, sans-serif
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  color: var(--almost-white);
  background-color: var(--indigo);
  min-height: 100vh;
}

p {
  margin-bottom: 1rem;
}

a,
a:visited,
a:link {
  color: var(--almost-white);
  text-decoration: none;
  transition: opacity 0.2s ease;
  opacity: 0.7;
}
a:hover,
a:focus {
  opacity: 0.9;
}

/* Sticky navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--indigo);
  transition: box-shadow 0.3s ease;
}

@keyframes navbar-shadow {
  to { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
}

@supports (animation-timeline: scroll()) {
  .navbar {
    animation: navbar-shadow linear both;
    animation-timeline: scroll();
    animation-range: 0px 1px;
  }
}
@supports (not(animation-timeline: scroll())) {
  .navbar{
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* Active section indicator — scroll-driven */
@supports (animation-timeline: view()) {
  body {
    timeline-scope: --home, --products, --about;
    --range: cover 20% cover 70%;
  }

  #home { view-timeline: --home block; }
  #products { view-timeline: --products block; }
  #about { view-timeline: --about block; }

  @keyframes nav-active {
    0% { opacity: 0.5; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0.5; }
  }

  @keyframes nav-indicator {
    5% { transform: scaleX(0); }
    15% { transform: scaleX(1); }
    85% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
  }

  .navbar-inner a[href="#"] {
    animation: nav-active linear;
    animation-timeline: --home;
    animation-range: var(--range);
  }
  .navbar-inner a[href="#"]::after {
    animation: nav-indicator linear;
    animation-timeline: --home;
    animation-range: var(--range);
  }

  .navbar-inner a[href="#products"] {
    animation: nav-active linear;
    animation-timeline: --products;
    animation-range: var(--range);
  }
  .navbar-inner a[href="#products"]::after {
    animation: nav-indicator linear;
    animation-timeline: --products;
    animation-range: var(--range);
  }

  .navbar-inner a[href="#about"] {
    animation: nav-active linear;
    animation-timeline: --about;
    animation-range: var(--range);
  }
  .navbar-inner a[href="#about"]::after {
    animation: nav-indicator linear;
    animation-timeline: --about;
    animation-range: var(--range);
  }
}

/* Terracotta accent line at the top */
.terracotta-line {
  height: 6px;
  background-color: var(--terracotta);
  width: 100%;
}

.navbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem 0;
  display: flex;
  gap: 2rem;
}

.navbar-inner a,
.navbar-inner a:visited,
.navbar-inner a:link {
  position: relative;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--almost-white);
  text-decoration: none;
  opacity: 0.5;
  padding-bottom: 0.7rem;
}

.navbar-inner a::after {
  content: '';
  position: absolute;
  left: -0.2rem;
  right: -0.2rem;
  bottom: 0;
  height: 1px;
  background-color: rgba(var(--almost-white-rgb), 0.25);
  transform: scaleX(0);
}

.navbar-inner a:hover,
.navbar-inner a:focus {
  opacity: 1;
}

main,
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6rem 0 4rem;
  text-align: center;
}

/* Monogram: P in a double-bordered square */
.monogram {
  width: 120px;
  height: 120px;
  border: 2px solid rgba(var(--almost-white-rgb), 0.55);
  padding: 6px;
  margin-bottom: 3rem;
}

.monogram-inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(var(--almost-white-rgb), 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--almost-white);
}

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 440px;
  opacity: 0.75;
  line-height: 1.5;
}


section {
  padding-top: 3rem;
}

section h2 {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  opacity: 0.8;
  text-transform: uppercase;
}

/* Products section */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-card {
  aspect-ratio: 2;
  border: 1px solid rgba(var(--almost-white-rgb), 0.15);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: var(--almost-white);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  margin-bottom: 1.5rem;
}

.product-card:hover {
  border-left-color: var(--terracotta);
  border-left-width: 2px;
  background-color: var(--indigo-light);
}

.product-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  display: block;
  margin-bottom: 0.3rem;
}

.product-type {
  font-family: var(--font-sans);
  font-size: .65rem;
  font-weight: 500;
  display: block;
  opacity: 0.6;
  text-transform: uppercase;
}

.product-desc {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  opacity: 0.7;
  display: block;
}

.about p {
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 440px;
  opacity: 0.6;
  line-height: 1.5;
}

/* Contact footer */
.contact {
  padding-top: 4rem;
  text-align: center;
}

.contact a {
  color: var(--almost-white);
  opacity: 0.4;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.contact a:hover {
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 540px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .monogram {
    width: 96px;
    height: 96px;
    margin-bottom: 2rem;
  }

  .monogram-inner {
    font-size: 2.8rem;
  }

  h1 {
    font-size: 2rem;
  }

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

  .product-card {
    ratio: auto;
    padding: 1.25rem;
  }
}
