/* ================================
   Graphman Coffee Roasters — Global Stylesheet
   Direction: Quiet luxury, warmth-forward (Pallet Coffee Roasters reference)
   ================================ */

:root {
  --color-accent: #627647;      /* sage — CTAs, thin lines only */
  --color-accent-dark: #4d5c38;
  --color-cream: #F5F1E8;       /* base tint */
  --color-white: #FFFFFF;
  --color-charcoal: #2B2B26;    /* text */
  --color-taupe: #C9BBA3;       /* secondary tint, structural only */

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1180px;
  --section-pad: clamp(4rem, 8vw, 7rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--color-charcoal);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

p {
  max-width: 62ch;
  font-size: 1.05rem;
}

.italic {
  font-style: italic;
  color: var(--color-accent-dark);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 56;
  background: rgba(245, 241, 232, 0.97);
  border-bottom: 1px solid rgba(43, 43, 38, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

.brand em {
  font-style: italic;
  color: var(--color-accent-dark);
}

.brand img {
  height: 84px;
  width: auto;
  display: block;
}

.site-footer .brand img {
  height: 42px;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  position: relative;
  font-size: 0.95rem;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-charcoal);
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 55;
    background: var(--color-cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    padding-top: 100px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }

  .main-nav.open {
    transform: translateY(0);
  }

  .nav-toggle {
    display: block;
  }
}

body.nav-open-lock {
  overflow: hidden;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  border-radius: 2px;
  border: 1px solid var(--color-accent);
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-solid {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-solid:hover {
  background: var(--color-accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-charcoal);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 88vh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero video,
.hero img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(to top, rgba(20, 20, 16, 0.62) 0%, rgba(20, 20, 16, 0.05) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  padding: 0 1.5rem 4rem;
  width: 100%;
}

.hero-content h1 {
  color: var(--color-white);
  max-width: 16ch;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 48ch;
}

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

.hero-content h1,
.hero-content p,
.hero-content .btn {
  animation: heroRise 0.8s ease both;
}

.hero-content p {
  animation-delay: 0.15s;
}

.hero-content .btn {
  animation-delay: 0.3s;
}

.hero-short {
  height: 60vh;
  min-height: 420px;
}

/* ---------- Sections ---------- */

.section {
  padding: var(--section-pad) 0;
}

.section-white {
  background: var(--color-white);
}

.section-tint {
  background: var(--color-taupe);
  background: color-mix(in srgb, var(--color-taupe) 35%, var(--color-cream));
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.rule {
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: 1.25rem;
  border: none;
}

/* ---------- Grids ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 860px) {
  .grid-2,
  .grid-3,
  .grid-gallery {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-white);
  padding: 2rem 1.75rem;
}

.card img {
  margin-bottom: 1.25rem;
}

.gallery-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-charcoal);
  color: var(--color-cream);
  padding: 3rem 0 2rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer a {
  color: var(--color-cream);
  opacity: 0.85;
}

.site-footer a:hover {
  opacity: 1;
  color: var(--color-taupe);
}

.footer-meta {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  opacity: 0.6;
  width: 100%;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.footer-social a {
  display: inline-flex;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-social img {
  width: 28px;
  height: 28px;
  display: block;
}

.map-frame {
  display: block;
  line-height: 0;
}

.map-frame iframe {
  display: block;
}

/* ---------- Contact page specifics ---------- */

.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 860px) {
  .contact-block {
    grid-template-columns: 1fr;
  }
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.info-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(43, 43, 38, 0.1);
}

.info-list span {
  display: block;
  font-size: 0.85rem;
  opacity: 0.65;
  margin-bottom: 0.15rem;
}

/* ---------- Storefront: Products & Cart ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.75rem;
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.product-price {
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.estimated-tag {
  font-weight: 400;
  opacity: 0.6;
  font-size: 0.8rem;
}

.product-controls {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-controls select,
.product-controls input[type="number"] {
  padding: 0.55rem;
  border: 1px solid rgba(43, 43, 38, 0.2);
  background: var(--color-cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-charcoal);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.qty-row input[type="number"] {
  width: 70px;
}

#cart-items {
  margin: 1.5rem 0;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(43, 43, 38, 0.1);
}

.cart-qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(43, 43, 38, 0.25);
  background: var(--color-white);
  color: var(--color-charcoal);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.qty-btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.cart-qty-value {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}

.cart-line-info {
  flex: 1;
}

.cart-line-name {
  font-weight: 600;
}

.cart-line-meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

.cart-line-price {
  font-weight: 600;
  white-space: nowrap;
}

.cart-line-remove {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(43, 43, 38, 0.25);
  background: var(--color-white);
  color: var(--color-accent-dark);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.cart-line-remove:hover {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-color: var(--color-charcoal);
}

#cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.3rem;
  font-family: var(--font-display);
  padding-top: 1.25rem;
  border-top: 2px solid var(--color-charcoal);
  margin-top: 0.5rem;
}

#cart-empty-message {
  opacity: 0.65;
  font-style: italic;
}

.cart-note {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 1.25rem;
}

#mini-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-charcoal);
  color: var(--color-cream);
  padding: 0.9rem 1.5rem;
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 60;
  font-size: 0.95rem;
}

#mini-cart-bar.visible {
  display: flex;
}

#mini-cart-bar a {
  color: var(--color-cream);
  text-decoration: underline;
  font-weight: 600;
}

.nav-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-cart-link svg {
  display: block;
}

.nav-cart-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* ---------- Statement Band ---------- */

.statement-band {
  text-align: center;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.statement-band p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.35;
  color: var(--color-accent-dark);
  max-width: 18ch;
  margin: 0 auto;
}

/* ---------- Signature Carousel ---------- */

.carousel-wrap {
  overflow: visible;
}

.carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem 1.5rem;
  margin: 0 -0.25rem;
  -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
  height: 5px;
}

.carousel::-webkit-scrollbar-track {
  background: transparent;
}

.carousel::-webkit-scrollbar-thumb {
  background: var(--color-accent);
}

.carousel-card {
  flex: 0 0 auto;
  width: min(300px, 78vw);
  scroll-snap-align: start;
}

.carousel-card .img-frame {
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.carousel-card .img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-card:hover .img-frame img {
  transform: scale(1.06);
}

.carousel-card h3 {
  font-size: 1.2rem;
  margin: 1rem 0 0.35rem;
}

.carousel-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Visit Us ---------- */

.visit-block {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .visit-block {
    grid-template-columns: 1fr;
  }
}

.visit-block .img-frame {
  overflow: hidden;
}

.visit-block .img-frame img {
  width: 100%;
  transition: transform 0.6s ease;
}

.visit-block .img-frame:hover img {
  transform: scale(1.04);
}

/* ---------- Generic hover-zoom frame (reusable) ---------- */

.img-frame {
  overflow: hidden;
}

.img-frame img {
  transition: transform 0.5s ease;
}

.img-frame:hover img {
  transform: scale(1.05);
}

.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}
