@import "./tokens.css";

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--green-dark);
}

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

/* ==========================================================================
   1. HEADER & HERO
   ========================================================================== */
.top,
.hero {
  position: relative;
  isolation: isolate;
  background: var(--green);
  color: var(--bg);
}

.top::before,
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./images/veg-header-overlay.png") center / cover no-repeat;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.top-inner,
.wrap,
.hero-inner,
.footer-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.top-inner,
.hero-inner {
  position: relative;
  z-index: 1;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bg);
  text-decoration: none;
}

.brand:hover {
  color: var(--bg);
}

.brand img {
  width: 36px;
  height: 24px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-logo);
  font-size: var(--fs-xl);
  letter-spacing: 1px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

nav a {
  color: var(--bg);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  padding: 48px 0 56px;
  text-align: left;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
}

.hero-copy {
  flex: 0 1 auto;
  max-width: 22rem;
}

.hero-logo {
  width: 88px;
  height: 58px;
  object-fit: contain;
}

.hero h1 {
  font-family: var(--font-logo);
  font-size: clamp(48px, 10vw, 72px);
  margin: 8px 0 0;
  letter-spacing: 2px;
}

.hero p,
.hero .tag {
  color: var(--bg);
  font-size: var(--fs-md);
  margin: 8px 0 32px;
}

.hero-phone {
  flex: 0 1 280px;
  width: min(280px, 46vw);
  height: auto;
  object-fit: contain;
  background: transparent;
}

/* ==========================================================================
   2. STICKY TOP BOOKMARK BAR
   ========================================================================== */
.bookmark-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--eggshell, #f9f9f6);
  border-bottom: 1px solid var(--border, #ccc);
  padding: 10px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bookmark-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.bookmark-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--charcoal);
  padding: 6px 16px;
  background: var(--bg);
  border: 1px solid var(--border, #ccc);
  border-radius: var(--radius-pill, 999px);
  transition: all 0.2s ease;
}

.bookmark-link:hover {
  background: var(--green);
  color: var(--bg);
  border-color: var(--green);
}

/* ==========================================================================
   3. MAIN CONTENT SHEET & FEATURE SECTIONS
   ========================================================================== */
.sheet {
  background: var(--bg);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  margin-top: -28px;
  padding: 64px 0 96px;
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.sheet.page {
  margin-top: 0;
  border-radius: 0;
  padding-top: 48px;
}

.feature-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px); /* Envelope full 16:9 screen below bookmark bar */
  padding: 80px 0;
  background: var(--bg);
}

.feature-section.alt-bg {
  background: var(--eggshell, #f9f9f6);
}

.feature-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

/* Gallery 1: Stacked / Overlapping */
.gallery-stacked {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 50%;
  padding: 12px;
}

.photo-card {
  width: 110%;
  aspect-ratio: 4 / 3;
  background-color: var(--eggshell, #f9f9f6);
  border: 3px solid var(--bg, #fff);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, z-index 0.2s ease;
}

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

.card-1 { grid-column: 1; grid-row: 1; z-index: 1; }
.card-2 { grid-column: 2; grid-row: 1; z-index: 2; margin-left: -15%; margin-top: 20%; }
.card-3 { grid-column: 1; grid-row: 2; z-index: 3; margin-top: -5%; }
.card-4 { grid-column: 2; grid-row: 2; z-index: 4; margin-left: -15%; margin-top: 15%; }

.photo-card:hover {
  z-index: 10;
  transform: scale(1.04);
}

/* Gallery 2: Centerpiece Grid with Corner Overlaps */
.gallery-centerpiece {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0;
  max-width: 50%;
  align-items: center;
  justify-items: center;
  position: relative;
}

.gallery-centerpiece .photo-card {
  margin: 0;
  border: 3px solid var(--bg, #fff);
  border-radius: var(--radius-lg, 10px);
}

.corner-tl { 
  grid-column: 1; 
  grid-row: 1; 
  width: 120px; 
  height: 90px; 
  margin-right: -25px; 
  margin-bottom: -20px; 
  z-index: 1; 
}

.corner-tr { 
  grid-column: 3; 
  grid-row: 1; 
  width: 120px; 
  height: 90px; 
  margin-left: -25px; 
  margin-bottom: -20px; 
  z-index: 1; 
}

.corner-bl { 
  grid-column: 1; 
  grid-row: 3; 
  width: 120px; 
  height: 90px; 
  margin-right: -25px; 
  margin-top: -20px; 
  z-index: 1; 
}

.corner-br { 
  grid-column: 3; 
  grid-row: 3; 
  width: 120px; 
  height: 90px; 
  margin-left: -25px; 
  margin-top: -20px; 
  z-index: 1; 
}

.centerpiece {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 220px;
  height: 240px;
  z-index: 3;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

/* Feature Cards & List Formatting */
.feature-card {
  flex: 1;
  max-width: 50%;
  background: var(--white, #ffffff);
  border: 1px solid var(--border, #ccc);
  border-radius: var(--radius-sheet, 24px);
  padding: 40px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
}

.feature-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--green);
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1;
}

/* ==========================================================================
   4. TYPOGRAPHY & CARDS
   ========================================================================== */
h1.page-title,
h2 {
  font-family: var(--font-display);
  font-size: var(--fs-header);
  color: var(--green);
  margin: 0 0 12px;
}

h3 {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--green-section);
  margin: 28px 0 8px;
}

p,
li {
  color: var(--charcoal);
}

.lede {
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 42rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 28px;
}

.chip {
  background: var(--green);
  color: var(--eggshell);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: var(--fs-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.card {
  background: var(--eggshell);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
}

/* ==========================================================================
   5. BUTTONS & ACTIONS
   ========================================================================== */
.btn {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  text-decoration: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--green-dark);
  color: var(--bg);
}

.btn-light {
  background: var(--bg);
  color: var(--green);
}

.btn-light:hover {
  background: var(--eggshell);
  color: var(--green-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-ghost:hover {
  background: var(--green);
  color: var(--bg);
}

.btn-ghost-light {
  background: transparent;
  color: var(--bg);
  border: 2px solid var(--bg);
}

.btn-ghost-light:hover {
  background: var(--bg);
  color: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.actions.center {
  justify-content: center;
}

/* ==========================================================================
   6. FORMS & UTILITIES
   ========================================================================== */
form {
  display: grid;
  gap: 8px;
  max-width: 32rem;
}

form label {
  margin-top: 8px;
}

form .btn {
  justify-self: start;
  margin-top: 12px;
}

label {
  font-weight: 600;
  font-size: var(--fs-sm);
}

input,
textarea {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--taupe);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  width: 100%;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green);
}

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

.legal {
  max-width: 42rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.meta {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.meta.spaced {
  margin-top: 24px;
}

.form-status {
  margin-top: 15px;
  font-weight: 700;
}

.form-status.is-success {
  color: var(--green);
}

.form-status.is-error {
  color: var(--danger);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
footer {
  background: var(--green-section);
  color: var(--bg);
  padding: 28px 0;
  font-size: var(--fs-sm);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

footer a:hover {
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   8. MEDIA QUERIES (Mobile Spacing Adjustments)
   ========================================================================== */
@media (max-width: 860px) {
  .bookmark-bar {
    display: none;
  }

  .feature-section,
  .sheet {
    min-height: auto;
    padding: 48px 0;
  }

  .feature-inner {
    flex-direction: column;
    gap: 36px;
  }

  .gallery-stacked,
  .gallery-centerpiece,
  .feature-card {
    max-width: 100%;
    width: 100%;
  }

  .corner-tl,
  .corner-tr,
  .corner-bl,
  .corner-br {
    width: 90px;
    height: 70px;
  }

  .corner-tl { margin-right: -15px; margin-bottom: -10px; }
  .corner-tr { margin-left: -15px; margin-bottom: -10px; }
  .corner-bl { margin-right: -15px; margin-top: -10px; }
  .corner-br { margin-left: -15px; margin-top: -10px; }

  .centerpiece {
    width: 160px;
    height: 190px;
  }
}

@media (max-width: 640px) {
  .top-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 40px 0 48px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn {
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-phone {
    align-self: center;
    width: min(220px, 70vw);
    flex-basis: auto;
  }
}
