/*
Theme Name: Stumptown Coffee
Theme URI: https://github.com/stumptown-coffee
Description: A Stumptown Coffee Roasters inspired theme
Author: Coffee House
Version: 1.0
Text Domain: stumptown
*/

/* ============================================
   FONTS
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --espresso:     #1f1815;
  --espresso-mid: #2e2018;
  --cream:        #f6f5f3;
  --cream-dark:   #ede9e3;
  --gold:         #c0a868;
  --gold-dark:    #a8924e;
  --brick:        #B23A2E;
  --warm-brown:   #6B4326;
  --kraft:        #E4D3B8;
  --text-dark:    #1f1815;
  --text-mid:     #4a3728;
  --text-light:   #8a7060;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;

  --max-w: 1240px;
  --gutter: 24px;
  --radius: 4px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================
   HEADER / NAV
============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--espresso);
  border-bottom: 1px solid rgba(192,168,104,0.2);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(31,24,21,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
}
.site-logo span {
  display: block;
  font-size: 0.55rem;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 2px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.main-nav a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246,245,243,0.75);
  transition: color var(--transition);
}
.main-nav a:hover { color: var(--gold); }
.main-nav .nav-cta {
  background: var(--gold);
  color: var(--espresso);
  padding: 8px 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: background var(--transition), color var(--transition);
}
.main-nav .nav-cta:hover { background: var(--gold-dark); color: var(--cream); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all var(--transition);
}

/* ============================================
   HERO SECTION
============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  background: var(--espresso);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/wp-content/themes/stumptown-coffee/img/hero-bg.jpg');
  background-size: cover;
  background-position: center 40%;
  opacity: 0.35;
  filter: sepia(20%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter) 0;
  max-width: 680px;
  margin-left: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter)));
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1;
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(246,245,243,0.7);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 32px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--gold);
  color: var(--espresso);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}
.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246,245,243,0.4);
}
.btn-outline:hover {
  border-color: var(--cream);
  background: rgba(246,245,243,0.1);
}
.btn-dark {
  background: var(--espresso);
  color: var(--cream);
  border-color: var(--espresso);
}
.btn-dark:hover {
  background: var(--espresso-mid);
}
.btn-gold-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-gold-outline:hover {
  background: var(--gold);
  color: var(--espresso);
}

/* ============================================
   SECTION COMMON
============================================ */
.section {
  padding: 96px var(--gutter);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.section-lead {
  font-size: 1rem;
  color: var(--text-mid);
  max-width: 560px;
  line-height: 1.75;
}

/* ============================================
   PRODUCTS SECTION
============================================ */
.section-products {
  background: var(--cream);
}
.products-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.product-card {
  background: #fff;
  border: 1px solid var(--cream-dark);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(31,24,21,0.12);
}

.product-card-img {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--kraft);
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img {
  transform: scale(1.04);
}

.roast-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid;
}
.roast-light  { color: #7a5c2e; border-color: #7a5c2e; background: rgba(255,255,255,0.85); }
.roast-medium { color: #5c3d1e; border-color: #5c3d1e; background: rgba(255,255,255,0.85); }
.roast-dark   { color: var(--espresso); border-color: var(--espresso); background: rgba(255,255,255,0.85); }

.product-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.product-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--espresso);
}
.product-flavor-notes {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--espresso);
}
.product-add-btn {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--espresso);
  color: var(--cream);
  border: none;
  padding: 9px 18px;
  cursor: pointer;
  transition: background var(--transition);
}
.product-add-btn:hover { background: var(--warm-brown); }

/* ============================================
   COLD BREW SECTION
============================================ */
.section-coldbrew {
  background: var(--espresso);
  padding: 0;
  overflow: hidden;
}
.coldbrew-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 620px;
}
.coldbrew-text {
  padding: 80px 64px 80px max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter)));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.coldbrew-text .section-eyebrow { color: var(--gold); }
.coldbrew-text .section-title { color: var(--cream); margin-bottom: 1rem; }
.coldbrew-text .section-lead { color: rgba(246,245,243,0.65); margin-bottom: 2rem; }

.coldbrew-img {
  position: relative;
  background: var(--espresso-mid);
  overflow: hidden;
}
.coldbrew-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

/* ============================================
   STORY SECTION
============================================ */
.section-story {
  background: var(--espresso-mid);
  color: var(--cream);
}
.story-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.story-text .section-title { color: var(--cream); margin-bottom: 1.5rem; }
.story-text p {
  color: rgba(246,245,243,0.68);
  line-height: 1.85;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.story-text p:last-of-type { margin-bottom: 2rem; }

.story-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(192,168,104,0.2);
  border-bottom: 1px solid rgba(192,168,104,0.2);
}
.story-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.story-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246,245,243,0.5);
}

.story-img {
  position: relative;
}
.story-img img {
  width: 100%;
  height: 620px;
  object-fit: cover;
  filter: sepia(15%) contrast(1.05);
}
.story-img-caption {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1rem;
}

/* ============================================
   ROAST SPECTRUM
============================================ */
.section-spectrum {
  background: var(--cream-dark);
  text-align: center;
}
.spectrum-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.spectrum-sub {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 3.5rem;
}
.spectrum-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #d4a853, #a3703a, #7a4d26, #4a2c18, #1f1815);
  margin: 0 auto 2.5rem;
  max-width: 800px;
}
.spectrum-labels {
  display: flex;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto 3rem;
}
.spectrum-labels span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
}

.spectrum-coffees {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.spectrum-item {
  text-align: center;
  width: 120px;
}
.spectrum-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  border: 3px solid rgba(0,0,0,0.1);
}
.spectrum-item-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.spectrum-item-note {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-light);
  text-transform: uppercase;
}

/* ============================================
   NEWSLETTER
============================================ */
.section-newsletter {
  background: var(--espresso);
  text-align: center;
  padding: 72px var(--gutter);
}
.section-newsletter .section-eyebrow { color: var(--gold); }
.section-newsletter .section-title { color: var(--cream); font-size: 2rem; margin-bottom: 0.75rem; }
.newsletter-sub { color: rgba(246,245,243,0.6); font-size: 0.9rem; margin-bottom: 2rem; }
.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(192,168,104,0.3);
  border-right: none;
  color: var(--cream);
  outline: none;
  font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(246,245,243,0.35); }
.newsletter-form input:focus { border-color: var(--gold); }
.newsletter-form button {
  background: var(--gold);
  color: var(--espresso);
  border: none;
  padding: 14px 24px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--transition);
}
.newsletter-form button:hover { background: var(--gold-dark); }

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background: #130e0c;
  color: rgba(246,245,243,0.6);
  padding: 60px var(--gutter) 32px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}
.footer-brand .site-logo { font-size: 1.3rem; margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 240px;
  color: rgba(246,245,243,0.45);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.85rem;
  color: rgba(246,245,243,0.5);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--cream); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 0.78rem;
  color: rgba(246,245,243,0.3);
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--gold);
  opacity: 0.7;
}

/* ============================================
   WOOCOMMERCE OVERRIDES
============================================ */
.woocommerce-page .woocommerce {
  max-width: var(--max-w);
  margin: 100px auto 60px;
  padding: 0 var(--gutter);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--espresso);
}
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--espresso) !important;
  color: var(--cream) !important;
  border-radius: 0 !important;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 12px 24px !important;
  transition: background var(--transition) !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover { background: var(--warm-brown) !important; }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .story-inner { grid-template-columns: 1fr; gap: 3rem; }
  .story-img { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 64px var(--gutter); }

  .main-nav { display: none; }
  .nav-mobile-toggle { display: flex; }

  .hero-content {
    margin-left: var(--gutter);
    margin-right: var(--gutter);
    max-width: 100%;
  }
  .hero h1 { font-size: clamp(2.25rem, 9vw, 3.5rem); }

  .products-grid { grid-template-columns: 1fr; }
  .products-header { flex-direction: column; align-items: flex-start; }

  .coldbrew-inner { grid-template-columns: 1fr; }
  .coldbrew-img { min-height: 300px; }
  .coldbrew-text { padding: 60px var(--gutter); }

  .story-stat-row { grid-template-columns: 1fr 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input[type="email"] { border-right: 1px solid rgba(192,168,104,0.3); border-bottom: none; }
}
