/* AIdrobe website. Concept: the fitting room. One memorable element (the clothes rail),
   everything else quiet. Cool chalk-lilac paper, aubergine ink, brand violet. */

:root {
  --chalk: #F2F0F6;
  --chalk-deep: #E7E3EF;
  --ink: #1C1626;
  --ink-soft: #4C4459;
  --violet: #6A1BE0;
  --violet-deep: #5212B8;
  --metal: #A39DB0;
  --tag: #E6DEFF;
  --white: #FCFBFE;
  --script: system-ui;
  --display: "Unbounded", var(--script), system-ui, sans-serif;
  --text: "Onest", var(--script), system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  --icon: url("/static/img/icons/violet.png");
}
/* The app's five themes; picked in the masthead and remembered per browser */
[data-theme="clay"] { --chalk: #F7EFE8; --chalk-deep: #EEE2D6; --ink: #2B1B17; --ink-soft: #6B5650; --violet: #C9562E; --violet-deep: #A8441F; --tag: #F6DDD1; --white: #FFFBF7; --icon: url("/static/img/icons/clay.png"); }
[data-theme="sage"] { --chalk: #EFF3EA; --chalk-deep: #E1E9DA; --ink: #18211A; --ink-soft: #556157; --violet: #4C7A55; --violet-deep: #3A6143; --tag: #D9E8D7; --white: #FAFBF7; --icon: url("/static/img/icons/sage.png"); }
[data-theme="ocean"] { --chalk: #EEF2F8; --chalk-deep: #DFE6F1; --ink: #0D1524; --ink-soft: #4B5668; --violet: #2457D6; --violet-deep: #1A43A8; --tag: #D9E3FA; --white: #F8FAFD; --icon: url("/static/img/icons/ocean.png"); }
[data-theme="rose"] { --chalk: #FBEFF2; --chalk-deep: #F2DFE5; --ink: #2A1419; --ink-soft: #6E525A; --violet: #B83F68; --violet-deep: #962F52; --tag: #F8DAE4; --white: #FFFAFB; --icon: url("/static/img/icons/rose.png"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--violet); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--violet-deep); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }

.skip { position: absolute; inset-inline-start: var(--gutter); top: -100px; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* Masthead */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
  max-width: 1320px; margin: 0 auto;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.wordmark-icon { width: 32px; height: 32px; border-radius: 22.5%; background: var(--icon) center / cover; box-shadow: 0 2px 6px rgba(40, 30, 60, 0.15); }
.themes { display: flex; gap: 6px; align-items: center; }
.themes button { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 0; background: var(--swatch); cursor: pointer; box-shadow: 0 0 0 2px var(--chalk), 0 0 0 3px transparent; transition: box-shadow .15s, transform .15s; }
.themes button:hover { transform: scale(1.12); }
.themes button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--chalk), 0 0 0 4px var(--swatch); }
.primary { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 0.95rem; }
.primary > a { color: var(--ink); text-decoration: none; }
.primary > a:hover, .primary > a[aria-current] { color: var(--violet); }
.primary > a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }

.language { position: relative; }
.language summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--chalk-deep); background: var(--white); }
.language summary::-webkit-details-marker { display: none; }
.language summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.language ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 5;
  list-style: none; margin: 0; padding: 8px;
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  max-height: 60vh; overflow: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px;
  background: var(--white); border: 1px solid var(--chalk-deep); border-radius: 14px;
  box-shadow: 0 24px 60px -24px rgba(40, 20, 80, 0.35);
}
.language a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.language a:hover { background: var(--chalk); }
.language a[aria-current] { background: var(--tag); font-weight: 600; }

/* Hero: the clothes rail. A fixed rod and seven cut-out pieces that slide along it onto their hooks. */
.hero { padding-bottom: clamp(48px, 8vw, 112px); overflow: hidden; }
.rail { margin: 0 calc(-1 * var(--gutter)); overflow: hidden; }
.rail-stage { position: relative; width: 100%; aspect-ratio: 2400 / 800; }
.rail-rod { position: absolute; top: 1.75%; left: 0; width: 100%; height: auto; z-index: 2; }
.rail-piece { position: absolute; top: 4.875%; height: auto; max-width: none; filter: drop-shadow(0 18px 16px rgba(40, 30, 60, 0.16)); }
/* Phones: the rail scrolls sideways by touch (no visible scrollbar) and starts on the middle pieces */
@media (max-width: 720px) {
  .rail { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-stage { width: 238%; }
}
@media (prefers-reduced-motion: no-preference) {
  .rail-piece { animation: hang 1.1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 80ms); }
  [dir="rtl"] .rail-piece { animation-name: hang-rtl; }
  @keyframes hang { from { transform: translateX(-60vw) rotate(-6deg); opacity: 0; } 70% { transform: translateX(0) rotate(2.5deg); opacity: 1; } to { transform: none; } }
  @keyframes hang-rtl { from { transform: translateX(60vw) rotate(6deg); opacity: 0; } 70% { transform: translateX(0) rotate(-2.5deg); opacity: 1; } to { transform: none; } }
}

.hero-copy {
  max-width: 1320px; margin: clamp(32px, 5vw, 64px) auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: end;
}
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 5rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 14ch; text-wrap: balance; }
.hero-side { padding-bottom: 0.6rem; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-soft); margin: 0 0 28px; max-width: 46ch; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 14px;
  background: var(--ink); color: var(--white); text-decoration: none; font-weight: 500;
}
.store svg { width: 17px; height: 20px; fill: currentColor; }
.store:hover { background: var(--violet); color: var(--white); }
@media (max-width: 860px) { .hero-copy { grid-template-columns: 1fr; } }

/* Care label: the feature list */
.care { padding: 0 var(--gutter) clamp(64px, 9vw, 128px); }
.care-label {
  position: relative; max-width: 760px; margin: 0 auto;
  background: var(--tag); color: var(--ink);
  padding: clamp(36px, 5vw, 56px) clamp(24px, 5vw, 60px) clamp(28px, 4vw, 44px);
  border-radius: 6px 6px 18px 18px;
}
.care-label::before { /* stitching */
  content: ""; position: absolute; inset: 10px; border: 1.5px dashed rgba(106, 27, 224, 0.35); border-radius: 4px 4px 12px 12px; pointer-events: none;
}
.care-label::after { /* the fold where the label is sewn in */
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 16px; background: linear-gradient(to bottom, rgba(28, 22, 38, 0.08), transparent); border-radius: 6px 6px 0 0;
}
.care-label h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 8px; }
.care-label ul { list-style: none; margin: 0; padding: 0; }
.care-label li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid rgba(28, 22, 38, 0.14); }
.care-label li:first-child { border-top: 0; }
.care-label h3 { font-size: 1.15rem; margin-bottom: 6px; }
.care-label p { margin: 0; color: var(--ink-soft); }
.care-icon { width: 48px; height: 48px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.care-icon .fill { fill: var(--violet); stroke: none; }

.closing { max-width: 1320px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(72px, 9vw, 120px); border-top: 1px solid var(--chalk-deep); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); }
.closing h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); max-width: 16ch; }
.closing p { margin: 0; color: var(--ink-soft); font-size: 1.1rem; max-width: 48ch; }
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } }

/* Inner pages */
.page-head { max-width: 1320px; margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.8rem); letter-spacing: -0.025em; max-width: 18ch; }
.page-head .lede { margin: 18px 0 0; }
.updated { margin: 14px 0 0; color: var(--ink-soft); }

.support-grid { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 10vw, 140px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }

/* The hang tag */
.tag {
  position: sticky; top: 24px;
  background: var(--ink); color: var(--white);
  padding: 56px 28px 30px; border-radius: 22px 22px 14px 14px;
  clip-path: polygon(18% 0, 82% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
}
.tag-hole { position: absolute; top: 20px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--chalk); box-shadow: inset 0 0 0 3px var(--metal); }
.tag h2 { font-size: 1.35rem; margin-bottom: 12px; }
.tag p { margin: 0; color: #D9D3E4; }
.tag .ui-name { color: var(--white); font-weight: 600; }
.tag a { color: color-mix(in srgb, var(--violet) 45%, white); }
.tag-email { margin-top: 16px !important; }
@media (max-width: 900px) { .tag { position: static; } }

.faq h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 12px; }
.faq details { border-top: 1px solid var(--chalk-deep); }
.faq details:last-of-type { border-bottom: 1px solid var(--chalk-deep); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; cursor: pointer; font-weight: 500; font-size: 1.12rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; transition: transform 0.25s ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .answer { padding: 0 0 22px; max-width: var(--measure); color: var(--ink-soft); }
.faq .answer p { margin: 0 0 12px; }
.ui-name { font-weight: 600; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .faq summary svg { transition: none; } }

/* Legal documents */
.legal { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 10vw, 140px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: 24px; }
.toc summary { font: 500 1rem/1.3 var(--display); cursor: pointer; list-style: none; padding-bottom: 10px; border-bottom: 1px solid var(--chalk-deep); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 12px 0 0; padding-inline-start: 1.3em; color: var(--ink-soft); font-size: 0.95rem; }
.toc li { padding: 4px 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--violet); text-decoration: underline; }
.prose { max-width: var(--measure); }
.prose .intro { font-size: 1.15rem; color: var(--ink); }
.prose section { padding-top: 12px; scroll-margin-top: 24px; }
.prose h2 { font-size: 1.35rem; margin: 28px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-bottom: 8px; }
@media (max-width: 900px) { .legal { grid-template-columns: 1fr; } .toc { position: static; } }

/* Footer */
.colophon { background: var(--ink); color: #CFC8DB; }
.colophon-inner { max-width: 1320px; margin: 0 auto; padding: 48px var(--gutter); display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: baseline; justify-content: space-between; }
.colophon-brand { margin: 0; font: 600 1.4rem/1 var(--display); color: var(--white); }
.colophon nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.colophon a { color: #CFC8DB; text-decoration: none; }
.colophon a:hover { color: var(--white); text-decoration: underline; }
.colophon-legal { margin: 0; width: 100%; font-size: 0.9rem; color: #9C94AA; }

/* Language picker root */
.root { max-width: 900px; margin: 0 auto; padding: 72px var(--gutter); }
.root .wordmark { font-size: 2rem; margin: 0 0 32px; }
.root h1 { font-size: 1.6rem; margin-bottom: 24px; }
.root-languages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.root-languages a { display: block; padding: 10px 12px; border-radius: 10px; background: var(--white); color: var(--ink); text-decoration: none; }
.root-languages a:hover { background: var(--tag); }

/* Scripts set without Latin glyphs: let the script family lead and relax the display tracking. */
:lang(ja) h1, :lang(ko) h1, :lang(zh-Hans) h1, :lang(zh-Hant) h1, :lang(zh-HK) h1, :lang(th) h1, :lang(hi) h1, :lang(ar) h1, :lang(fa) h1, :lang(he) h1 { letter-spacing: 0; line-height: 1.25; }
:lang(ja), :lang(ko), :lang(zh-Hans), :lang(zh-Hant), :lang(zh-HK) { --display: var(--script), "Unbounded", sans-serif; --text: var(--script), system-ui, sans-serif; }
:lang(ar), :lang(fa), :lang(he), :lang(hi), :lang(th) { --display: var(--script), sans-serif; --text: var(--script), system-ui, sans-serif; }
:lang(ar) h1, :lang(fa) h1, :lang(he) h1, :lang(hi) h1, :lang(th) h1 { font-weight: 600; }

/* Small screens: keep the masthead on one line. Privacy stays reachable from the footer. */
.store { white-space: nowrap; }
@media (max-width: 640px) {
  .masthead { padding-block: 14px; }
  .primary > a[href$="/privacy/"] { display: none; }
  .language summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .language summary { padding: 8px; }
}
@media (max-width: 640px) {
  .care-label { padding: 36px 22px 24px; }
  .care-label li { grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 0; }
  .care-icon { width: 40px; height: 40px; }
  .faq summary { font-size: 1.02rem; padding: 18px 0; }
  .page-head { padding-top: 24px; }
  .tag { padding: 52px 22px 26px; }
}
/* CJK: break headlines at phrase boundaries instead of mid-word. */
:lang(ja) h1, :lang(ja) h2, :lang(ko) h1, :lang(zh-Hans) h1, :lang(zh-Hant) h1, :lang(zh-HK) h1 { word-break: auto-phrase; line-break: strict; max-width: 18em; }
:lang(ko) h1, :lang(ko) h2 { word-break: keep-all; }

/* Showcases: before/after try-on and a suggested look, framed like a fitting-room mirror */
.showcase {
  max-width: 1320px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center;
}
.showcase-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.showcase-flip .showcase-copy { order: 2; }
.showcase-copy h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); max-width: 14ch; text-wrap: balance; }
.showcase-copy p { color: var(--ink-soft); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 42ch; margin: 18px 0 0; }
.chips { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 14px; }
.chips li { width: 104px; aspect-ratio: 1; display: grid; place-items: center; padding: 12px; background: var(--white); border-radius: 22px; box-shadow: 0 10px 24px -12px rgba(40, 30, 60, 0.35); }
.chips li:nth-child(2) { transform: rotate(4deg) translateY(10px); }
.chips img { max-height: 100%; width: auto; object-fit: contain; }

/* Arched frame shared by both showcases */
.compare, .look-frame {
  position: relative; margin: 0; aspect-ratio: 3 / 4; width: min(100%, 460px); justify-self: center;
  border-radius: 999px 999px 28px 28px / 46% 46% 28px 28px; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 10px var(--white), 0 0 0 11px var(--chalk-deep), 0 40px 60px -30px rgba(40, 30, 60, 0.45);
}
.compare img, .look-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-after { clip-path: inset(0 0 0 var(--pos)); }
.compare-tag {
  position: absolute; top: 22%; z-index: 2; padding: 6px 12px; border-radius: 999px;
  font: 600 0.78rem/1 var(--text); letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(20, 14, 30, 0.55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.compare-tag-before { inset-inline-start: 16px; }
.compare-tag-after { inset-inline-end: 16px; background: var(--violet); }
.compare::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; z-index: 2; box-shadow: 0 0 12px rgba(0, 0, 0, 0.25); }
.compare-handle {
  position: absolute; top: 58%; left: var(--pos); z-index: 3; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--violet);
  box-shadow: 0 8px 20px -6px rgba(40, 30, 60, 0.5); pointer-events: none;
}
.compare-handle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.compare-range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + * { outline: none; }
.compare:has(.compare-range:focus-visible) { outline: 3px solid var(--violet); outline-offset: 14px; }
[dir="rtl"] .compare-range { direction: ltr; }

.request { margin: 32px 0 0; padding: 18px 22px; max-width: 40ch; background: var(--white); border-radius: 22px 22px 22px 6px; box-shadow: 0 14px 30px -18px rgba(40, 30, 60, 0.45); font-style: italic; color: var(--ink); }
.request span { display: block; font: 600 0.78rem/1.2 var(--text); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: var(--violet); margin-bottom: 6px; }

.look { position: relative; display: grid; justify-items: center; padding: 24px 0 0; }
.look-pieces { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.look-pieces li { position: absolute; width: clamp(84px, 10vw, 128px); aspect-ratio: 1; display: grid; place-items: center; padding: 10px; background: var(--white); border-radius: 20px; box-shadow: 0 16px 30px -14px rgba(40, 30, 60, 0.45); }
.look-pieces img { max-height: 100%; width: auto; object-fit: contain; }
.look-pieces li:nth-child(1) { top: 8%; left: 2%; transform: rotate(-7deg); }
.look-pieces li:nth-child(2) { top: 40%; left: -2%; transform: rotate(5deg); }
.look-pieces li:nth-child(3) { top: 14%; right: 2%; transform: rotate(6deg); }
.look-pieces li:nth-child(4) { top: 48%; right: -1%; transform: rotate(-5deg); }
.look-note { position: relative; z-index: 2; width: min(92%, 380px); margin-top: -64px; padding: 16px 20px; background: var(--white); border-radius: 20px; box-shadow: 0 18px 36px -18px rgba(40, 30, 60, 0.5); }
.look-note strong { display: block; font: 600 0.78rem/1.2 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--violet); }
.look-note p { margin: 6px 0 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .look-pieces li { animation: bob 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.4s); }
  @keyframes bob { 50% { translate: 0 -10px; } }
}
@media (max-width: 900px) {
  .showcase, .showcase-flip { grid-template-columns: minmax(0, 1fr); }
  .showcase-flip .showcase-copy { order: 0; }
  .look-pieces li { width: 76px; }
}

/* Narrow phones: smaller swatches and the icon alone, so the masthead fits */
@media (max-width: 480px) {
  .themes { gap: 4px; }
  .themes button { width: 14px; height: 14px; }
  .wordmark span:not(.wordmark-icon) { display: none; }
}
