/* Home, all looks, one look. Tokens and shared parts are in base.css. */

/* Home */
.hero { display: grid; gap: 24px; padding-block: 28px 12px; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 14px; font-size: clamp(1.125rem, 2.2vw, 1.375rem); color: var(--ink2); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; }
.hero-cta .btn { flex: 1 1 0; min-width: 0; }
.hero-cta .link { flex: 1 1 100%; }
.hero-note { margin-top: 10px; }
.hero-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hero-photos .photo:nth-child(3) { display: none; }
@media (min-width: 720px) {
  .hero-photos { grid-template-columns: repeat(3, 1fr); }
  .hero-photos .photo:nth-child(3) { display: block; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 48px; padding-block: 56px 24px; }
  .hero-cta .btn, .hero-cta .link { flex: 0 1 auto; }
  .hero-photos { gap: 12px; }
  .hero-photos .photo:nth-child(2) { transform: translateY(20px); }
}
/* The one moment seen once: the headline first, the photos just behind it. */
@media (prefers-reduced-motion: no-preference) {
  .enter > .hero { animation: none; }
  .enter .hero-text { animation: rise 200ms var(--out) backwards; }
  .enter .hero-photos { animation: rise 200ms var(--out) 80ms backwards; }
}
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
.tile { position: relative; display: block; text-decoration: none; border-radius: var(--r-in); transition: transform 150ms var(--out); }
.tile .name { display: block; padding: 10px 2px 0; font-weight: 700; line-height: 1.3; }
.tile .small { display: block; padding-inline: 2px; }
.tile:last-child:nth-child(odd) { grid-column: span 2; }
.tile:last-child:nth-child(odd) .photo { aspect-ratio: 2 / 1.25; }
.tile:last-child:nth-child(odd) .photo img { object-position: top; }
@media (min-width: 720px) { .tile:last-child:nth-child(odd) { grid-column: auto; } .tile:last-child:nth-child(odd) .photo { aspect-ratio: 3 / 4; } }
.home-cheap { padding-top: 28px; padding-bottom: 8px; }
.home-cheap .chips.home-prices { margin-top: 24px; }
.home-occ { padding-top: 32px; }
.pair-teach { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .pair-teach { grid-template-columns: 1fr 1fr; gap: 48px; } }
.pair-text { margin-top: 8px; }
.pair-btn { margin-top: 18px; }
.free-strip { border-top: 1px solid var(--hair); padding-block: 18px; }
.free-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.free-text { flex: 1 1 32rem; font-size: 1.125rem; line-height: 1.5; color: var(--ink2); }

/* Cards: the price is the strongest line under the photo. */
.card .meta { margin-top: 4px; font-size: 1.0625rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.card .cap { font-size: .9375rem; line-height: 1.35; color: var(--ink2); }
.card:active .photo img, .tile:active img { transform: scale(1); }

/* All looks */
.looks-page { padding-top: 24px; }
.looks-count { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 6px; }
.chips.wrapped { flex-wrap: wrap; overflow: visible; padding: 0; margin: 0; }
.chips.occasions { margin-top: 12px; }
.price-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.price-row .chips.prices { display: contents; }
.looks-tools { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-block: 12px 24px; }
.looks-tools:empty { margin-block: 0 24px; }
.looks-tools .seg { flex: 1 1 12rem; max-width: 26rem; grid-auto-columns: auto; }
.looks-tools .seg button { padding-inline: 4px; white-space: nowrap; }
.looks-note { margin-top: 32px; }
.seg button { border: 2px solid transparent; }
.seg button[aria-pressed="true"] { border-color: var(--ink); }

/* The filters sheet: from the bottom on a phone, in the middle on a wider screen. */
html.sheet-on { overflow: hidden; }
.enter > .sheet-wrap { animation: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.sheet { position: relative; display: flex; flex-direction: column; width: 100%; max-height: 90vh; max-height: 90dvh; background: var(--bg); border-radius: var(--r) var(--r) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 16px 16px; }
.sheet-body h2 { font-size: 1.625rem; }
.sheet-body h2:focus:not(:focus-visible) { outline: none; }
.sheet-group { margin-top: 20px; }
.sheet-group .lbl { margin-bottom: 8px; letter-spacing: 0; line-height: 1.3; }
.sheet-status { margin-top: 18px; }
.sheet-foot { flex: none; display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--hair); }
.sheet-foot .btn { padding-inline: 10px; }
@media (min-width: 720px) {
  .sheet-wrap { align-items: center; }
  .sheet { width: min(560px, calc(100% - 64px)); border-radius: var(--r); }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: sheet-up 220ms var(--out); }
  .sheet-scrim { animation: sheet-fade 220ms var(--out); }
  @keyframes sheet-up { from { opacity: 0; transform: translateY(24px); } }
  @keyframes sheet-fade { from { opacity: 0; } }
}

/* One look */
.men { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.men .small { flex: 1 0 100%; }
.man { position: relative; width: 4rem; height: 4rem; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.man img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.man[aria-pressed="true"] { border-color: var(--ink); }
.man[aria-pressed="true"]::after { content: "\2713"; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font-size: .8125rem; font-weight: 800; line-height: 1; }
.look-price { margin-top: 10px; }
.look .total { display: grid; gap: 2px; justify-content: start; }
.look-price .lbl { margin-top: 16px; margin-bottom: 6px; }
.tier-shop { margin-top: 6px; }
.look-body > .lead { margin-top: 22px; }
.look-why { margin-top: 12px; }
.pieces { display: grid; gap: 10px; }
.piece { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.piece-name { min-width: 0; }
.piece .pn { font-weight: 700; line-height: 1.3; }
.piece .first { display: block; font-size: .875rem; font-weight: 700; color: var(--accent); }
.piece .pp { font-size: 1.0625rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.piece .detail { grid-column: 1 / -1; font-size: 1.125rem; line-height: 1.45; color: var(--ink2); }
.piece .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.piece .acts .link { padding-inline: 6px; }
.find { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.link.find-store { display: inline-block; padding-block: 11px; line-height: 1.3; text-align: left; }
.piece .find-seen { padding-inline: 6px; }
.list-cta .small { font-size: 1.125rem; }
.piece.owned .pp { color: var(--good); }
.list-cta { display: grid; gap: 10px; margin-top: 12px; }
.cta-done { font-weight: 700; }
.jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.look-body h2[tabindex]:focus:not(:focus-visible) { outline: none; }
.fit-lessons { margin-top: 12px; }
.wear li { padding-block: 10px; border-top: 1px solid var(--hair); }
.wear li:first-child { border-top: 0; padding-top: 0; }
.wear strong { display: block; }
.groom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.groom a { text-decoration: none; display: block; }
.groom strong { display: block; margin-top: 8px; line-height: 1.25; }
.gate-links { display: flex; flex-wrap: wrap; gap: 0 20px; }

/* The price and the next step stay in view on a phone. The same button below the pieces would only repeat it. */
.enter > .look-bar { animation: none; }
.look-bar { display: none; }
@media (max-width: 899px) {
  /* The price bar sits on top of the bottom tabs: the way around the site stays in reach. */
  .look-bar { position: fixed; inset: auto 0 calc(61px + env(safe-area-inset-bottom, 0px)) 0; z-index: 19; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--bg); border-top: 1px solid var(--hair); }
  .bar-price { flex: none; display: grid; }
  .bar-price strong { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
  .bar-price .small { white-space: nowrap; }
  .look-bar .btn { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 6px 12px; text-wrap: balance; }
  .list-cta .cta-main { display: none; }
  body:has(.look-bar) { padding-bottom: calc(141px + env(safe-area-inset-bottom, 0px)); }
  body:has(.look-bar) .toast { bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
  html:has(.look-bar) { scroll-padding-bottom: 150px; }
}
@media print { .sheet-wrap, .look-bar { display: none !important; } }

/* Home: the iPhone app */
