/* ==========================================================================
   Nordhem — Scandinavian furniture mockup
   Single shared stylesheet. Plain CSS, no build step.
   ========================================================================== */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #1f1c18;
  --ink-soft: #3b3833;
  --muted: #6f6a62;
  --line: #e7e3da;
  --accent: #8a9a82;        /* soft sage, used sparingly */
  --accent-deep: #6f7e67;
  --sand: #efeae0;

  --maxw: 1240px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow: 0 1px 2px rgba(31, 28, 24, 0.04), 0 12px 28px -20px rgba(31, 28, 24, 0.25);

  --font-head: "Jost", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

p { margin: 0 0 1em; }

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

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--accent-deep);
  margin: 0 0 14px;
}

.section { padding-block: clamp(56px, 8vw, 110px); }
.section--tight { padding-block: clamp(40px, 5vw, 70px); }

/* ----- buttons ----- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 30px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--block { display: block; width: 100%; text-align: center; }

.link-underline {
  font-family: var(--font-head);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 0.18s var(--ease);
}
.link-underline:hover { opacity: 0.6; }

/* ==========================================================================
   Announcement + header
   ========================================================================== */
.announce {
  background: var(--ink);
  color: #f3f0ea;
  text-align: center;
  font-family: var(--font-head);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  padding-left: 0.34em; /* optical balance for letter-spacing */
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width 0.2s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 6px;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: clamp(440px, 72vh, 720px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.55), rgba(20, 18, 15, 0.05) 55%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(40px, 6vw, 84px);
  max-width: 620px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 300;
  margin-bottom: 0.35em;
}
.hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  max-width: 460px;
  color: rgba(255, 255, 255, 0.92);
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }

/* ==========================================================================
   Section heading
   ========================================================================== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 44px); }
.section-head p { color: var(--muted); margin: 0; max-width: 40ch; }

/* ==========================================================================
   Category tiles
   ========================================================================== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.cat-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  background: var(--sand);
}
.cat-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.cat-tile:hover img { transform: scale(1.04); }
.cat-tile__label {
  position: absolute;
  left: 22px; bottom: 20px;
  z-index: 1;
  color: #fff;
  font-family: var(--font-head);
}
.cat-tile__label .name { font-size: 26px; display: block; }
.cat-tile__label .count { font-size: 13px; letter-spacing: 0.08em; opacity: 0.9; }
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.5), transparent 60%);
}

/* ==========================================================================
   Product cards / grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 30px);
}
.product-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card { display: block; }
.card__media {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.035); }
.card__tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.card__body { padding: 16px 2px 0; }
.card__title {
  font-family: var(--font-head);
  font-size: 18px;
  margin: 0 0 4px;
}
.card__meta { color: var(--muted); font-size: 13.5px; margin: 0 0 8px; }
.card__price { font-size: 15px; color: var(--ink); }
.card__price del { color: var(--muted); margin-right: 8px; }

/* ==========================================================================
   Story band
   ========================================================================== */
.story {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
}
.story__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.story__body h2 { font-size: clamp(28px, 3.4vw, 46px); }
.story__body p { color: var(--ink-soft); }

/* ==========================================================================
   Feature strip (3 columns)
   ========================================================================== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(36px, 4vw, 56px);
}
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }
.feature .num {
  font-family: var(--font-head);
  color: var(--accent-deep);
  font-size: 13px;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 10px;
}

/* ==========================================================================
   Newsletter
   ========================================================================== */
.newsletter { background: var(--sand); }
.newsletter__inner {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}
.newsletter h2 { font-size: clamp(26px, 3vw, 40px); }
.newsletter form {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.newsletter input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
}
.newsletter input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fineprint { color: var(--muted); font-size: 12.5px; margin-top: 14px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #d9d4cb;
  padding-block: clamp(48px, 6vw, 80px) 30px;
}
.site-footer a { color: #d9d4cb; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #a8a299; font-size: 14px; max-width: 32ch; margin-top: 14px; }
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: clamp(36px, 5vw, 60px);
  padding-top: 24px;
  color: #8f897f;
  font-size: 13px;
}

/* ==========================================================================
   Page header (shop / about)
   ========================================================================== */
.page-head {
  background: var(--sand);
  padding-block: clamp(48px, 6vw, 88px);
  text-align: center;
}
.page-head h1 { font-size: clamp(34px, 5vw, 60px); font-weight: 300; }
.page-head p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 8px; opacity: 0.6; }

/* ==========================================================================
   Shop layout (sidebar + grid)
   ========================================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.filters {
  position: sticky;
  top: 96px;
}
.filter-group { border-bottom: 1px solid var(--line); padding: 18px 0; }
.filter-group:first-child { padding-top: 0; }
.filter-group h3 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 10px;
  cursor: pointer;
}
.filter-group input { accent-color: var(--accent-deep); }
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.shop-toolbar .count { color: var(--muted); font-size: 14px; }
.shop-toolbar select {
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
}

/* ==========================================================================
   Product detail page
   ========================================================================== */
.pdp {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.pdp-gallery { position: sticky; top: 96px; }
.pdp-gallery__main {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 1 / 1;
}
.pdp-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.pdp-thumbs button {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 1 / 1;
}
.pdp-thumbs button.is-active { border-color: var(--ink); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info { padding-top: 4px; }
.pdp-info h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 300; margin-bottom: 10px; }
.pdp-price { font-size: 22px; margin-bottom: 4px; }
.pdp-price del { color: var(--muted); font-size: 17px; margin-right: 10px; }
.pdp-rating { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.pdp-rating .stars { color: #c2a86b; letter-spacing: 2px; }
.pdp-desc { color: var(--ink-soft); margin-bottom: 26px; }

.option { margin-bottom: 20px; }
.option > label {
  display: block;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.swatches { display: flex; gap: 10px; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
.swatch.is-active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink); }
.option select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
}

.buy-row {
  display: flex;
  gap: 14px;
  margin: 26px 0 18px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}
.qty button {
  width: 46px; height: 100%;
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--ink);
}
.qty input {
  width: 44px;
  text-align: center;
  border: none;
  font: inherit;
  font-size: 16px;
  background: none;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { flex: 1; }

.pdp-perks {
  list-style: none;
  padding: 18px 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.pdp-perks li { font-size: 14px; color: var(--muted); display: flex; gap: 10px; }
.pdp-perks li::before { content: "—"; color: var(--accent-deep); }

/* Accordion */
.accordion { margin-top: 28px; border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__head {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 0;
  font-family: var(--font-head);
  font-size: 16px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion__head .sign { font-size: 20px; color: var(--muted); transition: transform 0.2s var(--ease); }
.accordion__item.is-open .sign { transform: rotate(45deg); }
.accordion__panel {
  display: none;
  padding: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.accordion__item.is-open .accordion__panel { display: block; }
.accordion__panel ul { margin: 0; padding-left: 18px; }
.accordion__panel li { margin-bottom: 6px; }

/* ==========================================================================
   About page
   ========================================================================== */
.about-hero img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 7;
  object-fit: cover;
}
.prose { max-width: 60ch; }
.prose p { color: var(--ink-soft); font-size: 17px; }
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
}
.value h3 { font-size: 20px; margin-bottom: 8px; }
.value p { color: var(--muted); margin: 0; }
.value .num {
  font-family: var(--font-head);
  color: var(--accent-deep);
  letter-spacing: 0.14em;
  font-size: 13px;
  display: block;
  margin-bottom: 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nav,
  .header-actions .search-label { display: none; }
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 84vw);
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 96px 28px 28px;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    box-shadow: -20px 0 60px -30px rgba(0, 0, 0, 0.4);
    display: flex;
  }
  body.nav-open .site-nav { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .site-nav a { font-size: 19px; padding: 10px 0; }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 15, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease);
    z-index: 40;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

  .pdp,
  .story { grid-template-columns: 1fr; }
  .pdp-gallery, .filters { position: static; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 32px;
    margin-bottom: 12px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .product-grid,
  .product-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: 1fr; }
  .features,
  .values { grid-template-columns: 1fr; gap: 28px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .newsletter form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .product-grid,
  .product-grid--3 { grid-template-columns: 1fr; }
}
