/* ==========================================================================
   KANTFADEN — Minimalistische Alltagsmode
   Design System & Stylesheet (Zero-dependency, Cloudflare Pages ready)
   ========================================================================== */

:root {
  --bg-canvas: #f4f1ea;
  --bg-surface: #faf8f4;
  --bg-muted: #e8e3d9;
  --bg-dark: #171614;

  --ink-primary: #171614;
  --ink-secondary: #57534b;
  --ink-tertiary: #7e786d;
  --ink-inverse: #f4f1ea;

  --line-hairline: #dbd5c9;
  --line-strong: #171614;
  --accent-thread: #7d6b57;

  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container-max: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --header-height: 70px;

  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

button,
a {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-thread);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background-color: rgba(244, 241, 234, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-hairline);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-nav {
  height: 22px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.nav-link {
  position: relative;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-secondary);
  white-space: nowrap;
  padding-block: 0.35rem;
  transition: color 0.25s var(--ease-editorial);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--ink-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-editorial);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--ink-primary);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   1. Hero Section
   -------------------------------------------------------------------------- */

.hero-section {
  padding-block: clamp(2rem, 5vw, 4.25rem) clamp(3rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line-hairline);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-logo-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-logo {
  height: clamp(28px, 3.2vw, 38px);
  width: auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background-color: var(--accent-thread);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.4vw, 3.9rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  max-width: 15ch;
}

.hero-subtitle {
  margin: 1.35rem 0 0;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 44ch;
}

.hero-actions {
  margin-top: 2.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.75rem;
  background-color: var(--bg-dark);
  color: var(--ink-inverse);
  border: 1px solid var(--bg-dark);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-editorial),
    color 0.25s var(--ease-editorial),
    transform 0.25s var(--ease-editorial);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--ink-primary);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease-editorial);
}

.btn-primary:hover svg {
  transform: translateY(3px);
}

.hero-meta-strip {
  margin-top: clamp(2rem, 4vw, 3.25rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-hairline);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-primary);
}

.hero-media {
  margin: 0;
  position: relative;
}

.hero-image-frame {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-muted);
  border: 1px solid var(--line-hairline);
  aspect-ratio: 4 / 3;
}

.hero-image-frame picture,
.product-media-btn picture,
.about-image-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 74% 25%;
}

.hero-caption {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   2. Kollektion Section (Three Product Cards)
   -------------------------------------------------------------------------- */

.collection-section {
  padding-block: clamp(4rem, 7.5vw, 6.75rem);
  border-bottom: 1px solid var(--line-hairline);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.75rem);
}

.section-title {
  margin: 0.6rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0;
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 46ch;
  justify-self: end;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
}

.product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border: 1px solid var(--line-hairline);
  transition: border-color 0.3s var(--ease-editorial);
}

.product-card:hover {
  border-color: var(--ink-tertiary);
}

.product-media-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background-color: var(--bg-muted);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  text-align: left;
}

.product-media-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.65s var(--ease-editorial);
}

.product-card:hover .product-media-btn img {
  transform: scale(1.03);
}

.product-index {
  position: absolute;
  z-index: 2;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(250, 248, 244, 0.92);
  border: 1px solid var(--line-hairline);
  color: var(--ink-primary);
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem 1.35rem 1.5rem;
}

.product-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.product-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-primary);
  white-space: nowrap;
}

.product-title {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.product-desc {
  margin: 0.6rem 0 1.35rem;
  font-size: 0.915rem;
  line-height: 1.58;
  color: var(--ink-secondary);
}

.product-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.swatch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.swatch-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.swatch-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(23, 22, 20, 0.25);
  background-color: var(--swatch-color);
  cursor: pointer;
  transition: transform 0.2s var(--ease-editorial), box-shadow 0.2s var(--ease-editorial);
}

.swatch-btn[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3.5px var(--ink-primary);
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-label {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.btn-detail {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-primary);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.15rem;
  transition: color 0.2s var(--ease-editorial), border-color 0.2s var(--ease-editorial);
}

.btn-detail:hover {
  color: var(--accent-thread);
  border-color: var(--accent-thread);
}

/* --------------------------------------------------------------------------
   3. Über KANTFADEN Section
   -------------------------------------------------------------------------- */

.about-section {
  padding-block: clamp(4rem, 7.5vw, 6.75rem);
  border-bottom: 1px solid var(--line-hairline);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.about-media {
  margin: 0;
}

.about-image-frame {
  overflow: hidden;
  background-color: var(--bg-muted);
  border: 1px solid var(--line-hairline);
  aspect-ratio: 4 / 3;
}

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

.about-caption {
  margin-top: 0.75rem;
}

.about-content .section-title {
  max-width: 18ch;
}

.about-copy {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 54ch;
}

.pillars-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-hairline);
}

.pillar-item {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 0.75rem 1.25rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--line-hairline);
  align-items: baseline;
}

.pillar-term {
  color: var(--ink-primary);
}

.pillar-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
   Editorial Detail Modal (Showcase Only)
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background-color: rgba(23, 22, 20, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-editorial), visibility 0.25s;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  width: 100%;
  max-width: 820px;
  max-height: min(90vh, 760px);
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  position: relative;
  transform: translateY(10px);
  transition: transform 0.3s var(--ease-editorial);
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0);
}

.modal-image-wrap {
  background-color: var(--bg-muted);
  min-height: 320px;
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.modal-content {
  padding: clamp(1.5rem, 3.2vw, 2.25rem);
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-hairline);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.modal-close:hover {
  background-color: var(--bg-dark);
  color: var(--ink-inverse);
  border-color: var(--bg-dark);
}

.modal-title {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.modal-price {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.modal-desc {
  margin: 1.1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.modal-specs {
  margin: 1.4rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line-hairline);
}

.modal-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line-hairline);
  font-size: 0.875rem;
}

.modal-spec-row dt {
  color: var(--ink-tertiary);
}

.modal-spec-row dd {
  margin: 0;
  text-align: right;
  color: var(--ink-primary);
  font-weight: 500;
}

.modal-note {
  margin: auto 0 0;
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--ink-tertiary);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(2.25rem, 4vw, 3.25rem);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-logo {
  height: 18px;
  width: auto;
  align-self: flex-start;
}

.footer-tagline {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-tertiary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Scroll Reveal (Progressive Enhancement)
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s var(--ease-editorial),
    transform 0.65s var(--ease-editorial);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .product-card:hover .product-media-btn img,
  .btn-primary:hover svg {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .section-header {
    grid-template-columns: 1fr;
  }

  .section-intro {
    justify-self: start;
  }

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

@media (max-width: 680px) {
  :root {
    --header-height: 62px;
  }

  .brand-logo-nav {
    height: 18px;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .hero-image-frame {
    aspect-ratio: 3 / 2;
  }

  .hero-image-frame img {
    object-position: 78% 18%;
  }

  .hero-meta-strip {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

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

  .pillar-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-image-wrap {
    max-height: 300px;
  }
}
