/* Verdine — minimal, spacious, image-led. One scrolling page: landing, about, products. */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8a8a;
  --green: #035E00;

  --gutter: clamp(1.5rem, 4vw, 3.5rem);
  --inset: 20px; /* extra space on the left edge of all content */
  --left: calc(var(--gutter) + var(--inset));
  --sidebar: 16rem;
  --top: 1.5rem; /* space above the nav */
  --logo-bottom: 11rem; /* replaced by the script with the small logo's real bottom edge */

  --font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

a {
  color: var(--green);
  text-decoration: none;
}

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

/* ---------- Header: nav top left, Say Hi top right ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--top) var(--gutter) 0 var(--left);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--text);
  transition: color 0.3s ease;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--green);
}

.say-hi {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  transition: background 0.3s ease;
}

.say-hi:hover {
  background: #024a00;
}

/* ---------- Logo: full screen on load, shrinks into the header on scroll ---------- */

/* The script sets width/top (small state) and a transform that scales it up to full screen */
.logo {
  position: fixed;
  z-index: 3;
  left: var(--left);
  top: 5rem;
  width: min(500px, calc(100vw - 2 * var(--left)));
  margin: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.logo img {
  width: 100%;
  height: auto;
}

/* ---------- Sections: each fills the screen and scroll-snaps into place ---------- */

.section {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  padding: calc(var(--logo-bottom) + var(--gutter)) var(--gutter) 0 var(--left);
}

/* ---------- About ---------- */

.statement {
  max-width: 34rem;
  margin: clamp(2rem, 8vw, 6rem) 0 0;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.5;
  font-weight: 300;
}

/* ---------- Products: full-bleed image behind a product card ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

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

/* Soft white tint down the left edge so the menu and footer stay legible */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: min(50vw, 700px);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.submenu {
  max-width: var(--sidebar);
}

.submenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each product sits on a translucent card; the negative margin keeps its text aligned with the logo */
.submenu li {
  margin-left: -1rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.submenu li + li {
  margin-top: 0.5rem;
}

.submenu li > a {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--text);
}

/* Description under the product name; expands once the products section is in view */
.product-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s ease, opacity 0.5s ease;
}

.product-details > div {
  min-height: 0;
  overflow: hidden;
}

.products.is-active .product-details {
  grid-template-rows: 1fr;
  opacity: 1;
}

.product-details p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.product-details p:first-child {
  margin-top: 1.25rem;
}

.product-details p:last-child {
  margin-bottom: 0.4rem;
}

/* ---------- Footer: bottom of the last section ---------- */

.site-footer {
  position: absolute;
  left: var(--left);
  bottom: 1.5rem;
  font-size: 0.75rem;
  color: var(--text);
}

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