/* Aalsi Bandar — design preview. Task 6 copies these tokens into public/assets/site.css.
   Direction: very calm, soothing, a handcrafted piece of art (owner rule) + docs/design-taste.md. */
:root {
  /* paper and ink */
  --linen: #f6f1ea;      /* page */
  --bone: #fcfaf6;       /* raised panels */
  --ink: #2b2926;        /* text, buttons */
  --smoke: #6f6862;      /* secondary text (4.9:1 on linen) */
  --hairline: #e4dbce;
  /* thread and nature (from the owner's chat) */
  --brass: #b08d52;      /* stitches, small marks: never body text */
  --gold: #c4a062;       /* inside drawings only */
  --sage: #9b9470;       /* drawing fills, soft bands: never text */
  --moss: #4f5a3c;       /* link hover, one quiet band (6.5:1 with linen) */
  --clay: #8a5a3c;       /* tiny notes (5.2:1) */
  --sage-wash: #ecebdf;  /* calm band behind the name scene */

  --serif: "Cormorant Garamond", "Tiro Devanagari Hindi", Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 4vw, 3rem);
  --step-4: clamp(2.75rem, 6.5vw, 5.25rem);

  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(72px, 11vw, 148px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* handmade marks, drawn once as tiles */
  --stitch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='4'%3E%3Cline x1='1.5' y1='2' x2='6.5' y2='2' stroke='%23b08d52' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  --gond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8'%3E%3Ccircle cx='3' cy='4' r='1.6' fill='%23b08d52'/%3E%3Cline x1='8' y1='4' x2='16' y2='4' stroke='%239b9470' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --ajrakh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%232b2926' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M28 8 L34 22 L48 28 L34 34 L28 48 L22 34 L8 28 L22 22 Z'/%3E%3Ccircle cx='28' cy='28' r='4'/%3E%3Ccircle cx='0' cy='0' r='3'/%3E%3Ccircle cx='56' cy='0' r='3'/%3E%3Ccircle cx='0' cy='56' r='3'/%3E%3Ccircle cx='56' cy='56' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .16 0 0 0 0 .15 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* paper grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background-image: var(--grain); opacity: 0.045; mix-blend-mode: multiply;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
a:hover { color: var(--moss); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* thread marks */
.stitch { display: block; height: 4px; border: 0; margin: 0; background: var(--stitch) repeat-x left center; }
.gond { display: block; width: 120px; height: 8px; background: var(--gond) repeat-x left center; margin-top: 18px; }

/* Header */
.preview-note { margin: 0 auto; max-width: none; background: var(--bone); font-size: 0.8125rem; color: var(--smoke); text-align: center; padding: 8px var(--gutter); }
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--linen) 94%, transparent); backdrop-filter: blur(8px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.site-head .stitch { opacity: 0.55; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: auto; }
.brand span { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.32em; text-transform: uppercase; }
.nav { display: flex; gap: 32px; font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--smoke); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.bag { font-size: var(--step--1); text-decoration: none; }
@media (max-width: 720px) { .nav { display: none; } .brand span { font-size: 0.9rem; letter-spacing: 0.24em; } }

/* Type */
h1, h2 { text-wrap: balance; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: var(--step-4); font-weight: 300; }
h2 { font-size: var(--step-3); font-weight: 300; }
h3 { font-size: var(--step-1); font-weight: 500; }
p { margin: 0; max-width: 34em; }
.lede { font-size: var(--step-1); color: var(--smoke); font-weight: 300; }
.small { font-size: var(--step--1); color: var(--smoke); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px;
  background: var(--ink); color: var(--linen);
  border: 1px solid var(--ink); border-radius: 999px;
  font: 400 var(--step--1)/1 var(--sans); letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.btn:hover { background: var(--moss); border-color: var(--moss); color: var(--linen); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: transparent; color: var(--moss); border-color: var(--moss); }

/* Hero */
.hero { position: relative; min-height: min(90vh, 780px); display: grid; align-items: center; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 40%; }
.hero .wrap { position: relative; width: 100%; }
.hero-copy { max-width: 28rem; display: grid; gap: 26px; padding: 96px 0; }
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.hero-copy .stitch { width: 180px; }
@media (max-width: 720px) {
  .hero { min-height: auto; display: block; }
  .hero > img { position: static; height: 46vh; object-position: 72% 40%; }
  .hero-copy { padding: 40px 0 8px; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.section-head p { color: var(--smoke); }

/* The name scene: the one bold moment */
.namecraft-band { background: var(--sage-wash); }
.namecraft { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.namecraft form { display: grid; gap: 20px; margin-top: 32px; max-width: 26rem; }
@media (max-width: 860px) { .namecraft { grid-template-columns: 1fr; } }

/* a sewn label: panel with a running stitch just inside its edge */
.sewn { position: relative; background: var(--bone); border-radius: 6px; padding: clamp(24px, 5vw, 64px); box-shadow: 0 1px 0 var(--hairline); }
.sewn::before { content: ""; position: absolute; inset: 10px; border: 1.5px dashed color-mix(in srgb, var(--brass) 70%, transparent); border-radius: 4px; pointer-events: none; }

.tee svg { width: 100%; height: auto; display: block; border-radius: 3px; }
.tee .tee-close { margin-top: 16px; }
.tee .name { transition: opacity 240ms var(--ease); }

.field { display: grid; gap: 8px; }
.field label { font-size: var(--step--1); color: var(--smoke); }
.field input {
  height: 56px; padding: 0 18px; width: 100%;
  font: 400 1.35rem/1 var(--serif); color: var(--ink);
  background: var(--bone); border: 1px solid #cfc4b4; border-radius: 4px;
}
.field input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 1px var(--moss); }
.field .hint { font-size: var(--step--1); color: var(--smoke); min-height: 1.4em; }
.field .hint.error { color: #8a3b2e; }

/* From the studio: the owner's design studies */
.studio { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: auto auto; gap: 24px; }
.studio figure { margin: 0; display: grid; gap: 12px; align-content: start; }
.studio img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.studio figure:first-child { grid-row: span 2; grid-template-rows: 1fr auto; align-content: stretch; }
.studio figure:first-child img { aspect-ratio: auto; height: 100%; min-height: 0; }
.studio figcaption { font-family: var(--serif); font-size: var(--step-1); line-height: 1.25; }
.studio figcaption span { display: block; font-family: var(--sans); font-size: var(--step--1); color: var(--smoke); margin-top: 2px; }
@media (max-width: 860px) { .studio { grid-template-columns: 1fr 1fr; } .studio figure:first-child { grid-column: span 2; grid-row: auto; } .studio figure:first-child img { aspect-ratio: 4 / 3; height: auto; } }

/* Look closer */
.closer { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.closer img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 3px; }
.closer .copy { display: grid; gap: 18px; }
@media (max-width: 860px) { .closer { grid-template-columns: 1fr; } }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 24px; }
.cats a { text-decoration: none; display: grid; gap: 14px; }
.cats img { aspect-ratio: 1; object-fit: cover; border-radius: 3px; transition: transform 600ms var(--ease); }
.cats a:hover img { transform: scale(1.015); }
.cats span { font-family: var(--serif); font-size: var(--step-1); }
.cats .lead { grid-column: span 2; grid-row: span 2; grid-template-rows: 1fr auto; }
.cats .lead img { aspect-ratio: auto; height: 100%; min-height: 0; }
.cats .lead span { font-size: var(--step-2); }
@media (max-width: 960px) { .cats { grid-template-columns: repeat(2, 1fr); } }

/* Plain facts, separated by stitches */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 40px; }
.facts p { color: var(--smoke); font-size: var(--step--1); margin-top: 8px; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* Footer on a faint block-print */
.site-foot { position: relative; padding: 72px 0 48px; font-size: var(--step--1); color: var(--smoke); background: var(--bone); }
.site-foot::before { content: ""; position: absolute; inset: 0; background: var(--ajrakh); opacity: 0.06; pointer-events: none; }
.site-foot .wrap { position: relative; }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--moss); }
.site-foot .legal { margin-top: 48px; display: grid; gap: 2px; }
@media (max-width: 720px) { .site-foot .cols { grid-template-columns: 1fr; } }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 96px); padding: clamp(32px, 6vw, 80px) 0 var(--section); }
.pdp .sewn { position: sticky; top: 96px; align-self: start; }
.pdp .info { display: grid; gap: 28px; align-content: start; max-width: 30rem; }
.crumbs { font-size: var(--step--1); color: var(--smoke); }
.crumbs a { text-decoration: none; }
.price { font-family: var(--serif); font-size: var(--step-2); }
.price small { font-family: var(--sans); font-size: var(--step--1); color: var(--smoke); margin-left: 8px; }
.sizes { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.sizes legend { font-size: var(--step--1); color: var(--smoke); margin-bottom: 10px; }
.sizes .row { display: flex; gap: 10px; flex-wrap: wrap; }
.sizes input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); margin-right: 8px; }
.sizes label {
  min-width: 56px; height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 16px;
  border: 1px solid #cfc4b4; border-radius: 999px; cursor: pointer; font-size: var(--step--1);
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.sizes input:checked + label { background: var(--ink); color: var(--linen); border-color: var(--ink); }
.sizes input:checked + label .swatch { border-color: var(--linen); }
.sizes input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }
.added { font-size: var(--step--1); color: var(--smoke); min-height: 1.4em; }
details { padding: 18px 0; background: var(--stitch) repeat-x left top; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
summary::after { content: "+"; color: var(--smoke); }
details[open] summary::after { content: "–"; }
details p { margin-top: 12px; color: var(--smoke); font-size: var(--step--1); }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } .pdp .sewn { position: relative; top: auto; } }

/* One orchestrated moment: the hero text settles, then a running stitch sews itself in. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: settle 1100ms var(--ease) both; }
  .hero-copy > *:nth-child(2) { animation-delay: 160ms; }
  .hero-copy > *:nth-child(3) { animation: sew 1600ms 700ms steps(15, end) both; }
  .hero-copy > *:nth-child(4) { animation-delay: 420ms; }
}
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sew { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
