/* Motley Modular */
:root {
  --ink: #1f1330;
  --muted: #5d5070;
  --purple: #3b0f63;
  --violet: #6a2aa3;
  --lavender: #a98bdb;
  --bg: #faf8fc;
  --card: #ffffff;
  --line: #e7e0ef;
  --radius: 10px;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); }
a:hover { color: var(--purple); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.1; letter-spacing: .01em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand img { height: 48px; width: auto; }
nav { display: flex; align-items: center; gap: 22px; font-family: var(--head); font-size: 19px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--violet); }
nav a.shop { background: var(--purple); color: #fff; padding: 6px 14px; border-radius: 999px; }
nav a.shop:hover { background: var(--violet); color: #fff; }

/* Home */
.intro { padding-top: 56px; padding-bottom: 24px; }
.intro h1 { font-size: clamp(32px, 5vw, 52px); max-width: 15em; margin: 0 0 10px; color: var(--purple); }
.intro p { margin: 0; color: var(--muted); font-size: 19px; }
.section-title { font-size: 26px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 48px 0 18px; padding-top: 8px; border-top: 3px solid var(--lavender); display: inline-block; }
section[id] { scroll-margin-top: 80px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(59, 15, 99, .12); color: inherit; }
.card-img { height: 260px; padding: 18px; display: flex; align-items: center; justify-content: center; background: #f3eff8; }
.card-img img { max-height: 100%; width: auto; object-fit: contain; }
.card-text { padding: 14px 16px 18px; }
.card-text h3 { font-size: 26px; margin: 4px 0 6px; color: var(--purple); }
.card-text p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

.tag { font-family: var(--head); font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--violet); }

/* Product page */
.product { padding-top: 40px; }
.product-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px; align-items: start; }
.product-img { background: #f3eff8; border-radius: var(--radius); padding: 28px; display: flex; justify-content: center; }
.product-img img { max-height: 640px; width: auto; }
.product-info h1 { font-size: clamp(38px, 6vw, 60px); margin: 6px 0 12px; color: var(--purple); }
.lede { font-size: 20px; margin: 0 0 22px; }
.buy { display: inline-block; background: var(--purple); color: #fff; text-decoration: none; font-family: var(--head); font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 10px 22px; border-radius: 999px; }
.buy:hover { background: var(--violet); color: #fff; }
.product-info h2, .usage h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 32px 0 10px; }
.specs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.specs li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.usage { max-width: 720px; margin-top: 48px; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 10px; }
.controls { margin: 0; }
.controls dt { font-family: var(--head); font-size: 21px; font-weight: 600; color: var(--purple); margin-top: 18px; }
.controls dd { margin: 2px 0 0; }
.note { background: #f3eff8; border-left: 4px solid var(--lavender); padding: 10px 14px; border-radius: 4px; color: var(--muted); }

.figures { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 40px; }
.figures figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; flex: 0 1 auto; max-width: 100%; }
.figures img { max-height: 560px; width: auto; }

.back { margin: 48px 0 0; font-family: var(--head); font-size: 19px; text-transform: uppercase; letter-spacing: .06em; }
.back a { text-decoration: none; }

/* About / text pages */
.prose { max-width: 720px; padding-top: 48px; }
.prose h1 { font-size: 52px; color: var(--purple); margin: 0 0 16px; }

/* Footer */
.site-footer { margin-top: 80px; background: var(--purple); color: #e9e1f5; padding: 32px 0; text-align: center; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: #fff; }
.site-footer .small { font-size: 14px; opacity: .75; margin-top: 10px; }

/* Small screens */
@media (max-width: 760px) {
  .product-head { grid-template-columns: 1fr; gap: 28px; }
  .product-img img { max-height: 460px; }
  nav { gap: 14px; font-size: 17px; }
  .brand img { height: 38px; }
}
@media (max-width: 480px) {
  .site-header .wrap { padding-left: 14px; padding-right: 14px; }
  nav { gap: 10px; font-size: 15px; }
  nav a.shop { padding: 4px 10px; }
  .brand img { height: 32px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-img { height: 200px; padding: 12px; }
  .card-text h3 { font-size: 22px; }
}
