/* Sooji Daara, Immadihalli, Whitefield. The toned wear.
 *
 * Rebuilt after seeing their actual Instagram grid. The first version was
 * teal on cream with a paper pattern piece. Both were wrong.
 *
 * What the grid actually shows: macro shots of needlework, over and over.
 * Aari, zardozi, beads, mirror work. That is what they photograph, so that is
 * what they are proud of, so that is the page. A pattern piece is about
 * cutting, which is the part they never show.
 *
 * Palette is theirs, read off the work rather than the logo. The mint is only
 * the logo circle. What they actually make is jewel coloured: royal purple,
 * emerald, magenta, royal blue, and gold thread through all of it.
 */

:root {
  --gold:   #9c7328;   /* the thread */
  --gold-l: #c8a052;
  --mint:   #a9d5cd;   /* their logo circle, used as a field not an accent */
  --teal-d: #235f58;
  --plum:   #4a2545;   /* the purple that recurs most in their work */
  --magenta:#a01f52;
  --cream:  #fbf8f3;
  --ink:    #1c1a19;
  --soft:   #6f6960;
  --line:   #e2dbcd;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Noto Serif", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto,
           "Noto Sans", "Noto Sans Kannada", sans-serif;

  --pad: clamp(1.25rem, 5vw, 4rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 clamp(1rem, .95rem + .3vw, 1.15rem)/1.62 var(--sans);
  padding-bottom: 4.5rem;
}

body [lang="kn"] { display: none; }
:root[data-lang="kn"] body [lang="en"] { display: none; }
:root[data-lang="kn"] body [lang="kn"] { display: inline; }
.lang button[lang="kn"] { display: inline; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--ink); color: var(--cream); padding: .75rem 1rem; }

/* ── header ─────────────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 1.15rem var(--pad);
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.top.is-solid { border-bottom-color: var(--line); }
.top__name { font-family: var(--serif); font-size: 1.08rem; }
/* Their own tagline, off the logo. */
.top__name em {
  font-style: italic; color: var(--soft); font-size: .82em;
  letter-spacing: .04em;
}

.lang { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--soft); }
.lang button {
  background: none; border: 0; font: inherit; color: var(--soft); cursor: pointer;
  padding: .3rem .1rem; border-bottom: 2px solid transparent;
}
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold); }

/* ── hero ───────────────────────────────────────────────────────────── */

.hero {
  display: grid; gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--pad) clamp(2.5rem, 7vw, 4.5rem);
  align-items: center;
}
@media (min-width: 52rem) { .hero { grid-template-columns: 1fr 300px; } }

.kn-name {
  margin: 0 0 .6rem; color: var(--teal-d);
  font-size: clamp(1.1rem, 3vw, 1.4rem); letter-spacing: .04em;
}
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.7rem, 12vw, 5.4rem); line-height: .95; letter-spacing: -.035em;
}
.hero__sub {
  margin: clamp(1.2rem, 3.5vw, 1.8rem) 0 0; max-width: 32ch;
  font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--soft);
}

/* ── the embroidery motif ───────────────────────────────────────────── */

.motif { justify-self: center; width: min(78%, 300px); }
.motif svg { width: 100%; height: auto; display: block; }

.mo-ground { fill: var(--mint); opacity: .5; }

/* Every thread line is the same stroke. The dashes are the stitches. */
.thread {
  stroke: var(--gold);
  stroke-width: 2.1;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  fill: none;
}
.mo-leaf, .mo-petal { stroke-width: 1.9; }
.mo-petal { stroke: var(--gold-l); }

/* Worked in the order it is actually embroidered: stem, leaves, petals.
   pathLength is normalised in JS so one keyframe suits every shape. */
.thread { stroke-dashoffset: 0; }
.motif.is-worked .thread {
  animation: stitch .9s var(--ease) backwards;
  animation-delay: calc(.22s * var(--d, 0));
}
@keyframes stitch {
  from { stroke-dasharray: 0 400; }
  to   { stroke-dasharray: 5 4; }
}

/* Beads and mirrors go on last, the way a piece is finished. */
.bead { fill: var(--magenta); }
.motif.is-worked .bead {
  animation: laid .45s var(--ease) backwards;
  animation-delay: calc(2.1s + .1s * var(--b));
  transform-box: fill-box; transform-origin: center;
}
@keyframes laid { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── reveals ────────────────────────────────────────────────────────── */

[data-reveal] { opacity: 0; transform: translateY(14px); }
[data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

/* ── what they make ─────────────────────────────────────────────────── */

.make { padding: clamp(2rem, 6vw, 3.5rem) var(--pad) clamp(1.5rem, 4vw, 2.5rem); }

.eyebrow {
  margin: 0 0 1.1rem; color: var(--magenta);
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 700;
}

.make__list { list-style: none; margin: 0; padding: 0; }
.make__list li {
  position: relative; padding: .8rem 0;
  font-family: var(--serif); font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.08; letter-spacing: -.03em;
}
/* Each line seams to the next, so the list assembles the way a garment does. */
.make__list li::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: repeating-linear-gradient(to right, var(--line) 0 5px, transparent 5px 10px);
}
.make.is-in .make__list li::after {
  width: 100%;
  transition: width .9s var(--ease);
  transition-delay: calc(.13s * var(--i));
}
.make__note { margin: 1.5rem 0 0; max-width: 34ch; color: var(--soft); }

/* ── a real review ──────────────────────────────────────────────────── */

.said {
  background: var(--plum); color: var(--cream);
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--pad);
}
.said blockquote { margin: 0; max-width: 30ch; }
.said p {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 5.5vw, 2.6rem); line-height: 1.2; letter-spacing: -.015em;
}
.said cite {
  display: block; margin-top: 1.4rem; font-style: normal;
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-l);
}

/* ── the work up close ──────────────────────────────────────────────── */

.craft { padding: clamp(3rem, 9vw, 5rem) var(--pad) 0; }
.craft__grid {
  display: grid; gap: .5rem;
  grid-template-columns: 1fr 1fr;
}
/* Their grid leads with one large macro shot. So does this. */
.craft__slot.tall { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
@media (min-width: 46rem) {
  .craft__grid { grid-template-columns: repeat(4, 1fr); }
  .craft__slot.tall { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}

[data-slot] { position: relative; }
[data-slot]::after {
  content: attr(data-slot);
  position: absolute; left: .8rem; bottom: .7rem; max-width: calc(100% - 1.6rem);
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--soft);
}
.craft__slot {
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  background: #efe9dd; border: 1px solid var(--line);
  color: var(--soft); font-size: .82rem;
}

/* ── proof ──────────────────────────────────────────────────────────── */

.proof {
  margin-top: clamp(3rem, 9vw, 5rem);
  background: var(--mint); color: var(--teal-d);
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--pad);
}
.proof__n {
  margin: 0; font-family: var(--serif); font-variant-numeric: tabular-nums;
  font-size: clamp(4.5rem, 22vw, 10rem); line-height: .85; letter-spacing: -.04em;
}
.proof__l { margin: .7rem 0 0; max-width: 24ch; font-size: clamp(1rem, 2.3vw, 1.2rem); font-weight: 500; }

/* ── find ───────────────────────────────────────────────────────────── */

.find { padding: clamp(3rem, 9vw, 5rem) var(--pad); }
.find h2 {
  margin: 0 0 1.2rem; max-width: 22ch;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 4.6vw, 2.4rem); line-height: 1.14; letter-spacing: -.025em;
}
.find__addr { margin: 0 0 .5rem; max-width: 38ch; color: var(--soft); font-size: .95rem; }
.find__hours { margin: 0 0 2rem; color: var(--teal-d); font-weight: 600; }

.find__act { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: .95rem 1.5rem; background: var(--plum); color: var(--cream);
  border: 1px solid var(--plum);
  transition: background .25s ease, border-color .25s ease;
}
.btn:hover { background: #5d3157; border-color: #5d3157; }
.btn--line { background: none; color: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--cream); }

/* ── footer and dock ────────────────────────────────────────────────── */

footer {
  padding: 2.5rem var(--pad) 3rem;
  border-top: 1px solid var(--line); color: var(--soft); font-size: .875rem;
}
footer p { margin: 0 0 .3rem; }
.note { opacity: .85; font-size: .8rem; }

.dock {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--cream); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock a {
  padding: 1.05rem .5rem; text-align: center; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .95rem;
}
/* a.dock__wa, not .dock__wa: `.dock a` is more specific and would win. */
.dock a.dock__wa { background: var(--plum); color: var(--cream); }

/* ── floor ──────────────────────────────────────────────────────────── */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  /* The piece is finished rather than caught mid stitch. */
  .thread { stroke-dasharray: 5 4; }
  .bead { transform: none; opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; }
  .make__list li::after { width: 100%; }
}

@media print { .dock, .lang, .skip { display: none; } body { padding-bottom: 0; } }

/* Real work, cropped from their own grid. Their photographs, not stock. */
.craft__slot { padding: 0; overflow: hidden; }
.craft__slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
figure.craft__slot { margin: 0; }

/* Their own logo. The S is a needle with the thread trailing off it, which
   is the same idea the hero motif is built on. */
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand img { width: 34px; height: 34px; display: block; }
.brand__t { font-family: var(--serif); font-size: 1.08rem; }
.brand__t em { font-style: italic; color: var(--soft); font-size: .82em; letter-spacing: .04em; }
@media (max-width: 26rem) { .brand__t em { display: none; } }

/* ═══ THE MEASUREMENT SHEET ═══════════════════════════════════════════
   Chalk on dark cloth, because that is how a tailor actually marks. The
   figure is not decoration: focus a field and its line lights on the blouse,
   which is the part the customer cannot do over the phone. */

.sheet {
  padding: clamp(3rem, 9vw, 6rem) var(--pad);
  background: var(--plum);
  background-image:
    radial-gradient(120% 80% at 15% 0%, rgb(160 31 82 / .28), transparent 60%),
    radial-gradient(90% 70% at 95% 100%, rgb(35 95 88 / .3), transparent 60%);
  color: var(--cream);
}
.sheet .eyebrow { color: var(--gold-l); }
.sheet__h {
  margin: .5rem 0 clamp(2rem, 5vw, 3rem); max-width: 18ch;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 4.6vw, 2.6rem); line-height: 1.14;
}

.sheet__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 46rem) { .sheet__grid { grid-template-columns: 1fr 1fr; } }

.fig svg { display: block; width: 100%; max-width: 22rem; margin-inline: auto; overflow: visible; }
.fig__body { fill: rgb(251 248 243 / .05); stroke: rgb(251 248 243 / .5); stroke-width: 1.4; }

/* every dimension is drawn dim and comes up gold when its field has focus */
.fig__dims g { opacity: .3; transition: opacity .3s var(--ease); }
.fig__dims path { fill: none; stroke: var(--cream); stroke-width: 1.2; stroke-dasharray: 3 3; }
.fig__dims circle { fill: var(--cream); }
.fig__dims g.is-on { opacity: 1; }
.fig__dims g.is-on path { stroke: var(--gold-l); stroke-width: 2.4; stroke-dasharray: none; }
.fig__dims g.is-on circle { fill: var(--gold-l); r: 3.4; }
.fig__hint {
  margin: 1rem 0 0; text-align: center; min-height: 2.6em;
  font-size: .92rem; color: #d9cdd6;
}

.mm { display: grid; gap: .8rem; }
.mm label {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .6rem;
  padding: .55rem .8rem; border: 1px solid rgb(251 248 243 / .22);
  transition: border-color .25s ease, background .25s ease;
}
.mm label:focus-within { border-color: var(--gold-l); background: rgb(251 248 243 / .06); }
.mm__k { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #d9cdd6; }
.mm input {
  font: inherit; font-family: var(--serif); font-size: 1.5rem;
  width: 4ch; text-align: right; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--cream);
}
.mm input::placeholder { color: rgb(251 248 243 / .3); }
.mm input:focus { outline: none; }
.mm label i { font-style: normal; font-size: .85rem; color: #d9cdd6; }
.mm__note { margin: 1.1rem 0 0; font-size: .88rem; color: #d9cdd6; max-width: 46ch; }

.sheet .pick {
  margin: 2.4rem 0 .7rem; font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; color: var(--gold-l);
}
.sheet .chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.sheet .chips button {
  font: inherit; font-size: .92rem; cursor: pointer; padding: .5rem .95rem;
  border: 1px solid rgb(251 248 243 / .3); background: transparent; color: var(--cream);
  transition: all .2s ease;
}
.sheet .chips button[aria-pressed="true"] { background: var(--gold-l); border-color: var(--gold-l); color: #2b1a10; }

.when2 { display: grid; gap: .8rem; margin: 1.8rem 0 2.2rem; }
@media (min-width: 34rem) { .when2 { grid-template-columns: 1fr 1fr; } }
.when2 label { display: block; }
.when2 input {
  display: block; width: 100%; margin-top: .45rem; font: inherit; font-size: 1.05rem;
  padding: .6rem .7rem; border: 1px solid rgb(251 248 243 / .22); border-radius: 0;
  background: rgb(251 248 243 / .06); color: var(--cream);
}
.when2 input:focus { outline: none; border-color: var(--gold-l); }

.preview__k { margin: 0 0 .6rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--gold-l); }
.bubble {
  margin: 0 0 1.5rem; white-space: pre-line; max-width: 34ch;
  background: #dcf5c6; color: #10331a;
  padding: .85rem 1rem; border-radius: 10px 10px 10px 2px;
  font-size: .95rem; line-height: 1.5;
}
.btn--send { background: #0e7d40; border-color: #0e7d40; color: #fff; }
.btn--send:hover { background: #0b6733; }

@media (prefers-reduced-motion: reduce) {
  .fig__dims g, .mm label { transition: none; }
}

/* The sticky header would otherwise sit on top of the heading when the page
   is jumped to by anchor. */
.sheet { scroll-margin-top: 5rem; }
