/* ==========================================================================
   KNEEDLE — minimalist clothing brand
   Palette derived from the logo: warm gray + orange-red needle accent
   ========================================================================== */

:root {
  --ink: #2b2a2a;
  --gray: #636060;        /* logo text */
  --muted: #9a9797;
  --line: #e9e6e3;
  --paper: #ffffff;
  --paper-2: #f6f4f1;     /* soft off-white */
  --stone: #eceae6;
  --accent: #ff3a00;      /* logo needle accent */
  --accent-soft: rgba(255, 58, 0, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;

  --wrap: 1240px;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.eyebrow.light { color: rgba(255, 255, 255, 0.7); }

.btn {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 2rem;
  border-radius: var(--radius);
  transition: all 0.4s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.link-arrow {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 1rem;
}
.section-head p { color: var(--gray); font-size: 1.02rem; }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.announce p { opacity: 0.85; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo-wrap {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.4rem) 1rem 1rem;
}
.logo { width: clamp(150px, 22vw, 220px); height: auto; }

.navbar {
  border-top: 1px solid var(--line);
  position: relative;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0.95rem 1rem;
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 26px;
  height: 18px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 12vw, 9rem) var(--gap);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
}
.hero-sub {
  color: var(--gray);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: scroll 26s linear infinite;
}
.marquee-track span {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
}
.marquee-track span[aria-hidden] { color: var(--accent); }
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ---------- Featured collection ---------- */
.collection { padding: clamp(4rem, 9vw, 7rem) var(--gap); max-width: var(--wrap); margin: 0 auto; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.product { cursor: pointer; }
.product-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--stone), var(--paper-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease);
}
.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 58, 0, 0.05));
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.product:hover .product-media { transform: translateY(-6px); }
.product:hover .product-media::after { opacity: 1; }

.soon-tag {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
}
.product-info { padding: 1.1rem 0.2rem 0; }
.product-info h3 { font-size: 1rem; font-weight: 400; margin-bottom: 0.25rem; }
.product-info p { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.price { font-size: 0.9rem; color: var(--ink); }

/* ---------- Collections split ---------- */
.collections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: 0 var(--gap) clamp(4rem, 9vw, 7rem);
  max-width: var(--wrap);
  margin: 0 auto;
}
.collection-card { position: relative; overflow: hidden; border-radius: var(--radius); }
.collection-card-media {
  aspect-ratio: 4 / 5;
  transition: transform 0.7s var(--ease);
}
.collection-card-media.women { background: linear-gradient(160deg, #e7e2db, #d8d2ca); }
.collection-card-media.men { background: linear-gradient(160deg, #dfdcd8, #c9c4bd); }
.collection-card:hover .collection-card-media { transform: scale(1.04); }
.collection-card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(0deg, rgba(43, 42, 42, 0.5), transparent);
}
.collection-card-label span {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.collection-card-label em {
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ---------- Story ---------- */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(4rem, 9vw, 7rem) var(--gap);
  max-width: var(--wrap);
  margin: 0 auto;
}
.story-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
}
.story-text p { color: var(--gray); margin-bottom: 1rem; }
.story-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.figure { border-radius: var(--radius); border: 1px solid var(--line); }
.figure.f1 { aspect-ratio: 3 / 4; background: linear-gradient(160deg, var(--stone), var(--paper-2)); }
.figure.f2 { aspect-ratio: 3 / 4; margin-top: 2.5rem; background: linear-gradient(160deg, #efe9e2, #e2dcd3); }

/* ---------- Values ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(3rem, 7vw, 5rem) var(--gap);
  max-width: var(--wrap);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.value-num {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9rem;
}
.value h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.value p { color: var(--gray); font-size: 0.92rem; }

/* ---------- Journal ---------- */
.journal { padding: clamp(4rem, 9vw, 7rem) var(--gap); max-width: var(--wrap); margin: 0 auto; }
.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.post { cursor: pointer; display: block; color: inherit; }
.post-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--stone), var(--paper-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
  transition: transform 0.5s var(--ease);
}
.post:hover .post-media { transform: translateY(-6px); }
.post-meta {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.post h3 { font-size: 1.15rem; margin-top: 0.5rem; font-weight: 400; }

/* ---------- Journal article pages ---------- */
.article-page {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gap) clamp(4rem, 9vw, 7rem);
}
.article {
  max-width: 720px;
  margin: 0 auto;
}
.article-header { margin-bottom: 2rem; }
.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 300;
  margin-bottom: 1rem;
}
.article-lede {
  color: var(--gray);
  font-size: 1.08rem;
  max-width: 38rem;
}
.article-meta {
  margin-top: 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--stone), var(--paper-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 2rem 0 2.5rem;
}
.article-body p {
  color: var(--gray);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--ink);
  margin: 2.25rem 0 1rem;
}
.article-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
  color: var(--gray);
}
.article-body li { margin-bottom: 0.45rem; }
.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.article-nav a {
  color: var(--gray);
  transition: color 0.3s var(--ease);
}
.article-nav a:hover { color: var(--accent); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--ink);
  color: #fff;
  padding: clamp(4rem, 10vw, 7rem) var(--gap);
  text-align: center;
}
.newsletter-inner { max-width: 560px; margin: 0 auto; }
.newsletter h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  margin-bottom: 1rem;
}
.newsletter-sub { color: rgba(255, 255, 255, 0.65); margin-bottom: 2.25rem; }
.signup {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
}
.signup input {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s var(--ease);
}
.signup input::placeholder { color: rgba(255, 255, 255, 0.4); }
.signup input:focus { outline: none; border-color: var(--accent); }
.signup button {
  background: #fff;
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  padding: 0 1.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.signup button:hover { background: var(--accent); color: #fff; }
.form-note {
  min-height: 1.2rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-2); padding: clamp(3rem, 6vw, 4.5rem) var(--gap) 2rem; }
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: clamp(2rem, 6vw, 4rem);
  max-width: var(--wrap);
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.footer-logo { width: 150px; margin-bottom: 1rem; }
.footer-brand p { color: var(--gray); font-size: 0.92rem; max-width: 260px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--gray);
  padding: 0.3rem 0;
  transition: color 0.3s var(--ease);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--wrap);
  margin: 1.75rem auto 0;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a:hover { color: var(--accent); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .journal-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .story { grid-template-columns: 1fr; }
  .story-figures { max-width: 460px; }
  .values { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 1rem;
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
  }
  .nav-links.open { max-height: 340px; padding: 0.5rem 1rem 1.25rem; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.85rem 0; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .collections { grid-template-columns: 1fr; }
  .signup { flex-direction: column; }
  .signup button { padding: 0.95rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
