/* ========================================
   The Corner Lab — Design System
   ======================================== */

:root {
  --color-bg: #faf8f5;
  --color-bg-alt: #f2ede6;
  --color-surface: #ffffff;
  --color-text: #2c2825;
  --color-text-muted: #6b6560;
  --color-accent: #8b7355;
  --color-accent-light: #c4a882;
  --color-border: #e8e2da;
  --color-sale: #b85c4a;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --header-height: 72px;
  --announcement-height: 40px;
  --max-width: 1200px;
  --radius: 4px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Images */
.placeholder-image {
  background: linear-gradient(135deg, #e8e2da 0%, #d4cdc3 50%, #e8e2da 100%);
  aspect-ratio: 1;
}

.product-image,
.hero-image,
.product-main-image,
.brand-story-visual,
.journal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-image,
.product-main-image {
  aspect-ratio: 1;
}

.hero-image {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
}

.brand-story-visual {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
}

.journal-image {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}

/* ========================================
   Announcement Bar
   ======================================== */

.announcement-bar {
  background: var(--color-text);
  color: #fff;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  min-height: var(--announcement-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-bar a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.announcement-bar a:hover {
  color: #fff;
}

/* ========================================
   Header
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

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

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.main-nav ul {
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text);
  transition: color var(--transition);
}

.icon-btn:hover {
  color: var(--color-accent);
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: var(--transition);
}

.search-panel {
  border-top: 1px solid var(--color-border);
  padding: 16px 24px;
  background: var(--color-surface);
}

.search-form {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.search-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-family: inherit;
  font-size: 14px;
}

.search-form button {
  padding: 12px 24px;
  background: var(--color-text);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-text);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--color-text);
  color: var(--color-text);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-text);
  color: #fff;
}

.btn-block {
  width: 100%;
  margin-bottom: 12px;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 70vh;
}

.hero--banner {
  position: relative;
  max-width: none;
  min-height: 85vh;
  padding: 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(250, 248, 245, 0.96) 0%,
    rgba(250, 248, 245, 0.88) 45%,
    rgba(250, 248, 245, 0.55) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  min-height: 85vh;
}

.hero-product-stack {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.hero-stack-item {
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(44, 40, 37, 0.15);
  border: 3px solid #fff;
}

.hero-stack-item--1 {
  top: 0;
  left: 0;
  z-index: 3;
}

.hero-stack-item--2 {
  top: 18%;
  right: 0;
  z-index: 2;
}

.hero-stack-item--3 {
  bottom: 0;
  left: 22%;
  z-index: 1;
  width: 52%;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: italic;
  font-size: 0.85em;
  color: var(--color-text-muted);
}

.hero-desc {
  color: var(--color-text-muted);
  max-width: 420px;
  margin-bottom: 32px;
}

.hero-visual .hero-image {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
}

/* Trust Bar */
.trust-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.trust-list strong {
  display: block;
  color: var(--color-text);
  font-weight: 500;
}

.trust-icon {
  border-radius: 50%;
  object-fit: cover;
}

.trust-symbol {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: 14px;
  flex-shrink: 0;
}

/* Pattern sections */
.section--pattern {
  position: relative;
}

.section--pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/brand/pattern-texture.png");
  background-size: 400px;
  opacity: 0.35;
  pointer-events: none;
}

.section--pattern > * {
  position: relative;
  z-index: 1;
}

/* Features */
.features-section > .features-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 32px 28px;
  text-align: center;
  transition: box-shadow var(--transition);
}

.feature-card:hover {
  box-shadow: 0 12px 40px rgba(44, 40, 37, 0.08);
}

.feature-icon {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.feature-icon--wide {
  width: 100%;
  max-width: 160px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.product-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 6px;
}

/* CTA Banner */
.cta-banner {
  background: var(--color-text);
  color: #fff;
  overflow: hidden;
}

.cta-banner-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
}

.cta-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
}

.cta-banner .btn-primary {
  background: #fff;
  color: var(--color-text);
}

.cta-banner .btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-text);
}

/* ========================================
   Sections
   ======================================== */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px;
}

.section--alt {
  background: var(--color-bg-alt);
  max-width: none;
}

.section--alt > .section-header,
.section--alt > .product-grid,
.section--alt > .features-grid {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.section-eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* ========================================
   Product Grid
   ======================================== */

.product-grid {
  display: grid;
  gap: 32px 24px;
}

.product-grid--2 { grid-template-columns: repeat(2, 1fr); }
.product-grid--3 { grid-template-columns: repeat(3, 1fr); }
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }

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

.product-image-link {
  position: relative;
  display: block;
  overflow: hidden;
  margin-bottom: 16px;
}

.product-image {
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.03);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-sale {
  background: var(--color-sale);
  color: #fff;
}

.badge-new {
  background: var(--color-text);
  color: #fff;
}

.product-info h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 8px;
}

.product-price {
  font-size: 14px;
  margin-bottom: 12px;
}

.product-price del {
  color: var(--color-text-muted);
  margin-right: 8px;
}

.product-price--large {
  font-size: 1.5rem;
  font-weight: 500;
}

.product-rating {
  color: var(--color-accent);
  font-size: 13px;
  margin-bottom: 8px;
}

.product-rating span {
  color: var(--color-text-muted);
}

.product-info .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 12px;
}

/* ========================================
   Brand Story
   ======================================== */

.brand-story {
  background: var(--color-text);
  color: #fff;
}

.brand-story-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.brand-story-visual {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  opacity: 0.85;
}

.brand-story-content h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 20px;
}

.brand-story-content p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
  line-height: 1.7;
}

.brand-story .btn-primary {
  background: #fff;
  color: var(--color-text);
}

.brand-story .btn-primary:hover {
  background: var(--color-accent-light);
  color: var(--color-text);
}

/* ========================================
   Journal
   ======================================== */

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.journal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.journal-card:hover {
  box-shadow: 0 8px 32px rgba(44, 40, 37, 0.08);
}

.journal-image {
  display: block;
  aspect-ratio: 16/10;
}

.journal-content {
  padding: 24px;
}

.journal-content time {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.journal-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 8px 0 12px;
  line-height: 1.4;
}

.journal-content p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 64px 24px 0;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .logo {
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a,
.footer-contact a {
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer-contact p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.footer-note {
  font-size: 12px !important;
  font-style: italic;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ========================================
   Product Page
   ======================================== */

.product-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 72px;
}

.product-main-image {
  aspect-ratio: 1;
  margin-bottom: 16px;
}

.product-thumbs {
  display: flex;
  gap: 12px;
}

.thumb {
  width: 72px;
  height: 72px;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 1;
}

.thumb.active {
  border-color: var(--color-accent);
}

.product-brand {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.product-summary h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
}

.product-lead {
  color: var(--color-text-muted);
  margin: 20px 0 28px;
  line-height: 1.7;
}

.product-options {
  margin-bottom: 24px;
}

.product-options label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
}

.qty-btn {
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: var(--color-text);
}

.qty-control input {
  width: 48px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 14px;
  background: var(--color-surface);
}

.product-meta {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.product-meta p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

/* Tabs */
.product-tabs {
  margin-bottom: 72px;
}

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.tab {
  padding: 14px 24px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

.tab-panel {
  display: none;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.tab-panel.active {
  display: block;
}

.ingredients-table {
  width: 100%;
  border-collapse: collapse;
}

.ingredients-table th,
.ingredients-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.ingredients-table th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
}

.ingredient-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.product-detail-content {
  max-width: var(--max-width);
  margin: 0 auto 72px;
  padding: 0 24px;
}

.product-detail-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 40px 0 20px;
}

.product-detail-content h2:first-child {
  margin-top: 0;
}

.product-note {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.usage-list {
  padding-left: 20px;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.usage-list li {
  margin-bottom: 8px;
}

.product-spec {
  margin-top: 16px;
  color: var(--color-text-muted);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .product-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    inset: calc(var(--announcement-height) + var(--header-height)) 0 0 0;
    background: var(--color-bg);
    padding: 32px 24px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 99;
  }

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

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .main-nav a {
    font-size: 16px;
  }

  .hero,
  .hero-inner,
  .brand-story-inner,
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero--banner,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 24px;
  }

  .hero-product-stack {
    max-width: 280px;
  }

  .trust-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

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

  .hero {
    padding: 40px 24px;
    min-height: auto;
  }

  .product-grid--2,
  .product-grid--3,
  .product-grid--4,
  .journal-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section {
    padding: 48px 24px;
  }
}
