/* ==================================================
   Global Foundation
   Design tokens, resets, shared utilities, shared sections, and global controls
   ================================================== */

/* ==================================================
   1. Design Tokens
   ================================================== */

:root {
  --charcoal: #292626;
  --charcoal-soft: #3a3534;
  --cream: #fbf7ef;
  --cream-deep: #f1e8d8;
  --white: #ffffff;
  --gold: #c59a4a;
  --gold-dark: #9d762f;
  --teal: #2f7d78;
  --teal-dark: #245f5b;
  --coral: #d67b68;
  --rose: #b86c78;
  --sage: #869b7e;
  --text: #332f2d;
  --muted: #716a65;
  --border: rgba(51, 47, 45, 0.14);
  --shadow: 0 18px 50px rgba(51, 47, 45, 0.12);
  --radius-small: 10px;
  --radius-medium: 20px;
  --radius-large: 34px;
  --container: 1180px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", Arial, sans-serif;
}

/* ==================================================
   2. Reset and Global Defaults
   ================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1,
h2 {
  font-family: var(--font-display);
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.9rem, 6vw, 5.65rem);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 4vw, 3.75rem);
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

/* ==================================================
   3. Global Layout Utilities
   ================================================== */

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 105px 0;
}

.section-soft {
  background: var(--cream-deep);
}

/* ==================================================
   4. Accessibility Utilities
   ================================================== */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 10px 16px;
  color: var(--white);
  background: var(--charcoal);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
/* ==================================================
   7. Back-to-Top Control
   ================================================== */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;

  display: grid;
  place-items: center;

  width: 50px;
  height: 50px;

  color: var(--white);
  background: var(--teal);
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(41, 38, 38, 0.22);

  font-size: 1.4rem;
  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);

  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--teal-dark);
  transform: translateY(-3px);
}
/* ==================================================
   9. Trust Strip
   ================================================== */

.trust-strip {
  color: var(--white);
  background: var(--charcoal);
}

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

.trust-grid article {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 138px;
  padding: 30px 38px;
}

.trust-grid article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.trust-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--gold);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-size: 1.3rem;
}

.trust-grid h2 {
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  letter-spacing: 0;
}

.trust-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.81rem;
}

/* ==================================================
   10. Shared Section Headings and Links
   ================================================== */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 43px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading p:last-child {
  max-width: 690px;
  margin: 16px auto 0;
  color: var(--muted);
}

.centered-heading {
  justify-content: center;
  text-align: center;
}

.text-link {
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  font-weight: 800;
}

.text-link span {
  display: inline-block;
  margin-left: 5px;
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}
/* ==================================================
   13. Brand Story Section
   ================================================== */

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

.story-grid {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  align-items: center;
  gap: clamp(55px, 8vw, 110px);
}

.story-media {
  position: relative;
}

.story-image {
  display: grid;
  min-height: 590px;
  place-items: center;
  color: rgba(51, 47, 45, 0.46);
  background: #b8c7ae;
  border-radius: 180px 180px 26px 26px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.play-button {
  position: absolute;
  right: -28px;
  bottom: 48px;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: var(--white);
  background: var(--teal);
  border: 8px solid var(--white);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.story-copy p:not(.eyebrow) {
  color: var(--muted);
}

.story-copy .button {
  margin-top: 12px;
}

/* ==================================================
   14. Tutorial Section
   ================================================== */

.tutorial-banner {
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(41, 38, 38, 0.97), rgba(47, 125, 120, 0.92)),
    var(--charcoal);
}

.tutorial-banner .eyebrow {
  color: #f0c879;
}

.tutorial-banner p:not(.eyebrow) {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.72);
}

.tutorial-banner .button-primary {
  color: var(--charcoal);
  background: var(--gold);
}

.tutorial-banner .button-primary:hover {
  background: #d9b462;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(45px, 8vw, 105px);
}

.tutorial-cards {
  display: grid;
  gap: 18px;
}

.tutorial-cards article {
  padding: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--radius-medium);
  backdrop-filter: blur(10px);
}

.tutorial-cards h3 {
  font-size: 1.15rem;
}

.tutorial-cards p {
  margin-bottom: 0;
}

.tutorial-number {
  display: block;
  margin-bottom: 13px;
  color: var(--gold);
  font-weight: 800;
}

/* ==================================================
   15. Testimonials Section
   ================================================== */

.testimonials-section {
  background: #f5eee4;
}

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

.testimonial-grid blockquote {
  margin: 0;
  padding: 33px;
  background: var(--white);
  border: 1px solid rgba(51, 47, 45, 0.08);
  border-radius: var(--radius-medium);
  box-shadow: 0 12px 35px rgba(51, 47, 45, 0.06);
}

.testimonial-grid blockquote p {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.55;
}

.testimonial-grid footer {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.stars {
  margin-bottom: 16px;
  color: var(--gold);
  letter-spacing: 0.13em;
}

/* ==================================================
   16. Newsletter Section
   ================================================== */

.newsletter-section {
  padding: 85px 0;
  color: var(--white);
  background: var(--teal);
}

.newsletter-section .eyebrow {
  color: #f6d58d;
}

.newsletter-section h2 {
  max-width: 680px;
}

.newsletter-section p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
}

.newsletter-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  align-items: center;
  gap: 65px;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.newsletter-form input {
  min-width: 0;
  height: 54px;
  padding: 0 20px;
  color: var(--text);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 100px;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(197, 154, 74, 0.2);
}

.newsletter-form .button-primary {
  color: var(--charcoal);
  background: var(--gold);
}

.form-message {
  grid-column: 1 / -1;
  min-height: 1.4em;
  margin: 2px 0 0;
  font-size: 0.82rem;
}

/* ==================================================
   17. Social Gallery
   ================================================== */

.social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.social-grid a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: rgba(51, 47, 45, 0.48);
  background: #cbbcad;
  border-radius: var(--radius-small);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 180ms ease;
}

.social-grid a:nth-child(2) {
  background: #a7c3be;
}

.social-grid a:nth-child(3) {
  background: #d8be7f;
}

.social-grid a:nth-child(4) {
  background: #dda598;
}

.social-grid a:nth-child(5) {
  background: #b7c5ae;
}

.social-grid a:hover {
  transform: translateY(-5px);
}
/* ==================================================
   19. Cart Drawer
   ================================================== */

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  width: min(430px, 100%);
  height: 100dvh;
  flex-direction: column;
  padding: 25px;
  background: var(--cream);
  box-shadow: -20px 0 60px rgba(41, 38, 38, 0.18);
  transform: translateX(110%);
  transition: transform 250ms ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  margin: 0;
  font-size: 2rem;
}

.cart-close,
.search-close {
  font-size: 1.8rem;
}

.cart-items {
  overflow-y: auto;
  flex: 1;
  padding: 25px 0;
}

.empty-cart-message {
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  aspect-ratio: 1;
  background: #d5c5b8;
  border-radius: 12px;
}

.cart-item h3 {
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.remove-item {
  padding: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cart-footer {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 17px;
}

.checkout-button {
  width: 100%;
}

.cart-footer > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  text-align: center;
}

/* ==================================================
   20. Overlay and Search Modal
   ================================================== */

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(41, 38, 38, 0.55);
  backdrop-filter: blur(2px);
}

.search-modal {
  width: min(680px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.search-modal::backdrop {
  background: rgba(41, 38, 38, 0.58);
}

.search-modal-inner {
  position: relative;
  padding: 55px;
  background: var(--cream);
}

.search-close {
  position: absolute;
  top: 17px;
  right: 17px;
}

.search-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-field input {
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
}
