/* =========================================
   A Yarn A Day — Brand-Focused Redesign
   ========================================= */

:root {
  --cream: #fff7ee;
  --cream-deep: #f8e8d5;
  --white: #ffffff;
  --green: #556b1f;
  --green-dark: #354314;
  --brown: #4d2d1d;
  --yellow: #efbc2f;
  --peach: #efb08a;
  --pink: #eaa0ac;
  --text: #3f3a34;
  --muted: #746c63;
  --border: rgba(77, 45, 29, 0.14);
  --shadow: 0 22px 55px rgba(77, 45, 29, 0.12);
  --radius-large: 34px;
  --radius-medium: 22px;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
textarea {
  font: inherit;
}

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

h1,
h2,
h3 {
  color: var(--brown);
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.08;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
}

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

h3 {
  font-size: 1.6rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 247, 238, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.mini-brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brown);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.mini-brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}

.main-nav {
  display: flex;
  gap: 26px;
  font-weight: 700;
}

.main-nav a {
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-button,
.button {
  min-height: 50px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.header-button,
.button-primary {
  background: var(--green);
  color: var(--white);
}

.button-secondary {
  border: 2px solid var(--green);
  color: var(--green);
}

.button-light {
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: var(--white);
}

.header-button:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(77, 45, 29, 0.14);
}

.brand-hero {
  width: min(calc(100% - 40px), 1000px);
  margin: 0 auto;
  padding: 72px 0 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.main-logo {
  width: min(100%, 850px);
  max-height: 560px;
  object-fit: contain;
}

.brand-tagline {
  max-width: 700px;
  margin: -10px auto 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions,
.slide-actions,
.connect-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.featured-patterns {
  padding: 95px max(20px, calc((100% - var(--page-width)) / 2));
  background: var(--cream-deep);
}

.section-heading {
  margin-bottom: 38px;
}

.centered-heading {
  max-width: 830px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.centered-heading h1 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.centered-heading > p:last-child,
.page-hero > p:last-child {
  color: var(--muted);
  font-size: 1.15rem;
}

.eyebrow,
.card-label {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.pattern-slider {
  position: relative;
}

.slides {
  position: relative;
}

.pattern-slide {
  min-height: 520px;
  display: none;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: var(--shadow);
}

.pattern-slide.active {
  display: grid;
  animation: fadeSlide 450ms ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-image-wrap {
  min-height: 520px;
  overflow: hidden;
  background: var(--white);
}

.slide-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bee-image-wrap img {
  object-fit: contain;
  padding: 28px;
}

.slide-copy {
  padding: clamp(38px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-copy h2 {
  margin-bottom: 20px;
}

.slide-copy > p:not(.card-label) {
  color: var(--muted);
  font-size: 1.08rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--green);
  font-weight: 900;
}

.slider-arrow {
  width: 54px;
  height: 54px;
  position: absolute;
  top: 50%;
  z-index: 10;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--brown);
  box-shadow: 0 10px 28px rgba(77, 45, 29, 0.16);
  font-size: 2.3rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.slider-arrow-left {
  left: -27px;
}

.slider-arrow-right {
  right: -27px;
}

.slider-dots {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(85, 107, 31, 0.28);
  cursor: pointer;
}

.slider-dot.active {
  width: 34px;
  border-radius: 999px;
  background: var(--green);
}

.about-section {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 100px auto;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 70px;
}

.about-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.about-gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}

.about-gallery img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

.about-gallery img:first-child {
  grid-row: 1 / 3;
  object-fit: contain;
  background: var(--white);
  padding: 16px;
}

.connect-section {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto 100px;
  padding: 55px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  border-radius: var(--radius-large);
  background: var(--green);
  color: rgba(255, 255, 255, 0.86);
}

.connect-section h2,
.connect-section .eyebrow {
  color: var(--white);
}

.connect-section h2 {
  margin-bottom: 12px;
}

.connect-section p:last-child {
  margin-bottom: 0;
}

.page-hero {
  width: min(calc(100% - 40px), 900px);
  margin: 0 auto;
  padding: 95px 0 58px;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 24px;
}

.pattern-library {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 20px 0 100px;
}

.library-card {
  margin-bottom: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: var(--shadow);
}

.library-card-reverse .library-image {
  order: 2;
}

.library-image {
  min-height: 470px;
  overflow: hidden;
}

.library-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bee-library-image img {
  object-fit: contain;
  padding: 28px;
}

.library-copy {
  padding: clamp(38px, 6vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.library-copy > p:not(.card-label) {
  color: var(--muted);
  font-size: 1.05rem;
}

.pattern-tags {
  margin: 18px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pattern-tags span {
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--brown);
  font-size: 0.85rem;
  font-weight: 800;
}

.coming-soon-panel {
  padding: 46px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 2px dashed rgba(85, 107, 31, 0.35);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.65);
}

.coming-soon-panel h2 {
  margin-bottom: 12px;
}

.coming-soon-panel p:last-child {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
}

.product-hero {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 78px 0 90px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;
}

.product-main-image {
  overflow: hidden;
  border: 12px solid var(--white);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: var(--shadow);
}

.product-main-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-summary h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 6vw, 5.4rem);
}

.product-intro {
  color: var(--brown);
  font-size: 1.22rem;
  font-weight: 700;
}

.product-summary > p:not(.eyebrow):not(.product-intro):not(.small-note) {
  color: var(--muted);
}

.small-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-details {
  padding: 90px max(20px, calc((100% - var(--page-width)) / 2));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 70px;
  background: var(--cream-deep);
}

.product-details > div > p:last-child {
  color: var(--muted);
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 18px 0 18px 34px;
  position: relative;
  border-bottom: 1px solid var(--border);
  color: var(--brown);
  font-weight: 800;
}

.feature-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--yellow);
}

.gallery-section {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 95px 0;
}

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

.project-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(77, 45, 29, 0.08);
}

.project-gallery img {
  width: 100%;
  height: 330px;
  object-fit: cover;
}

.project-gallery figcaption {
  padding: 17px 20px;
  color: var(--brown);
  font-weight: 900;
  text-align: center;
}

.product-cta {
  margin-bottom: 100px;
}

.site-footer {
  padding: 56px max(20px, calc((100% - var(--page-width)) / 2));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  background: var(--brown);
  color: rgba(255, 255, 255, 0.78);
}

.site-footer strong {
  color: var(--white);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
  color: var(--white);
  font-weight: 800;
}

.copyright {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 0.9rem;
}

@media (max-width: 930px) {
  .main-nav {
    display: none;
  }

  .pattern-slide,
  .library-card,
  .product-hero,
  .product-details,
  .about-section {
    grid-template-columns: 1fr;
  }

  .pattern-slide {
    min-height: 0;
  }

  .slide-image-wrap {
    min-height: 420px;
  }

  .library-card-reverse .library-image {
    order: initial;
  }

  .about-gallery {
    min-height: 520px;
  }

  .connect-section,
  .coming-soon-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .header-inner {
    min-height: 72px;
  }

  .mini-brand span {
    display: none;
  }

  .mini-brand img {
    width: 50px;
    height: 50px;
  }

  .header-button {
    min-height: 42px;
    padding: 0 16px;
    font-size: 0.88rem;
  }

  .brand-hero {
    width: min(calc(100% - 24px), 1000px);
    padding: 45px 0 60px;
  }

  .brand-tagline {
    margin-top: 0;
  }

  .hero-actions,
  .slide-actions,
  .connect-buttons {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .button,
  .slide-actions .button,
  .connect-buttons .button {
    width: 100%;
  }

  .featured-patterns {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .slide-image-wrap {
    min-height: 310px;
  }

  .slide-copy {
    padding: 32px 24px 38px;
  }

  .slider-arrow {
    width: 44px;
    height: 44px;
    font-size: 1.9rem;
  }

  .slider-arrow-left {
    left: -12px;
  }

  .slider-arrow-right {
    right: -12px;
  }

  .about-section,
  .page-hero,
  .pattern-library,
  .product-hero,
  .gallery-section,
  .connect-section {
    width: min(calc(100% - 28px), var(--page-width));
  }

  .about-section {
    margin: 70px auto;
    gap: 38px;
  }

  .about-gallery {
    min-height: 0;
    grid-template-columns: 1fr 1fr;
  }

  .about-gallery img {
    min-height: 170px;
  }

  .about-gallery img:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    max-height: 390px;
  }

  .connect-section,
  .coming-soon-panel {
    padding: 35px 25px;
  }

  .page-hero {
    padding-top: 66px;
  }

  .library-image {
    min-height: 320px;
  }

  .library-copy {
    padding: 34px 24px 40px;
  }

  .product-hero {
    padding: 52px 0 70px;
    gap: 38px;
  }

  .product-main-image {
    border-width: 8px;
  }

  .product-details {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-gallery img {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
