/* ==========================================================================
   Try On Haul — tryonhaul.si
   Editorial ivory / burgundy. No frameworks, no external assets.
   ========================================================================== */

:root {
  --ivory: #F6F1E8;
  --ivory-deep: #EEE6D8;
  --ivory-soft: #FBF8F2;
  --burgundy: #6D2637;
  --burgundy-deep: #521B29;
  --ink: #211B19;
  --muted: #6A5F58;
  --rule: rgba(33, 27, 25, 0.16);
  --rule-strong: rgba(33, 27, 25, 0.32);
  --rule-light: rgba(246, 241, 232, 0.28);

  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Palatino Linotype", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;

  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --container: 1300px;
  --section-y: clamp(4.5rem, 10vw, 9rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--ivory);
  font-size: 0.9375rem;
  border-radius: 2px;
  transition: top 160ms var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 1.25rem;
}

.section__title {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  max-width: 16ch;
}

.section__head {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section__head--split {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: end;
}

.section__aside {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 34ch;
}

@media (min-width: 900px) {
  .section__head--split {
    grid-template-columns: 1fr auto;
  }

  .section__aside {
    text-align: right;
    padding-bottom: 0.4rem;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  background: var(--burgundy);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
  white-space: nowrap;
}

.button:hover {
  background: var(--burgundy-deep);
}

.button:active {
  transform: translateY(1px);
}

.button--small {
  padding: 0.7rem 1.1rem;
  font-size: 0.875rem;
}

.button--light {
  background: var(--ivory);
  color: var(--burgundy);
}

.button--light:hover {
  background: var(--ivory-soft);
}

.closing .button:focus-visible {
  outline-color: var(--ivory);
}

.button__short {
  display: none;
}

@media (max-width: 899px) {
  .button__long {
    display: none;
  }

  .button__short {
    display: inline;
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 232, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  gap: 1rem 2rem;
  min-height: 4.25rem;
}

.wordmark {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.wordmark__mark {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 22%;
}

.site-nav {
  grid-area: nav;
  justify-self: center;
}

.site-nav__list {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.site-nav__list a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms var(--ease);
}

.site-nav__list a:hover {
  border-bottom-color: var(--ink);
}

.site-header__actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

/* Language switch */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lang-switch__btn {
  color: var(--muted);
  padding: 0.35rem 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.lang-switch__btn:hover {
  color: var(--ink);
}

.lang-switch__btn[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.lang-switch__sep {
  color: var(--rule-strong);
}

/* Mobile navigation toggle */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.875rem;
}

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 12px;
  display: block;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--ink);
  transition: transform 200ms var(--ease), top 200ms var(--ease);
}

.nav-toggle__bars::before {
  top: 0;
}

.nav-toggle__bars::after {
  top: 10px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 5px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 5px;
  transform: rotate(-45deg);
}

@media (max-width: 899px) {
  .site-header__inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "brand actions toggle"
      "nav nav nav";
    gap: 0 0.9rem;
    min-height: 3.75rem;
  }

  .site-header__actions {
    gap: 0.9rem;
  }

  .nav-toggle {
    grid-area: toggle;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    justify-self: stretch;
    border-top: 1px solid var(--rule);
  }

  .site-nav__list {
    flex-wrap: wrap;
    gap: 0 1.5rem;
    padding: 0.5rem 0;
  }

  .site-nav__list a {
    display: inline-block;
    padding: 0.7rem 0;
    font-size: 1rem;
  }

  /* With JS, the nav collapses behind the toggle; without JS it stays visible. */
  .js .site-nav {
    display: none;
  }

  .js .site-header.is-open .site-nav {
    display: block;
  }
}

@media (max-width: 479px) {
  .nav-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 399px) {
  .wordmark__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 7vw, 6.5rem) clamp(3.5rem, 8vw, 7rem);
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.75rem, 1.5rem + 6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 11ch;
}

.hero__lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 44ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.hero__cta {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero__figure {
  margin: 0;
  position: relative;
}

.hero__portraits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  aspect-ratio: 4 / 5;
}

.hero__image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: 73% center;
  background: var(--ivory-deep);
}

.hero__image--menswear {
  object-position: 43% center;
}

.hero__caption {
  margin-top: 0.85rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: right;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(3rem, 6vw, 7rem);
  }

  .hero__figure {
    margin-top: 2.5rem;
    padding-left: clamp(0rem, 2vw, 2rem);
  }

  .hero__portraits {
    aspect-ratio: 5 / 6;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
}

.section--how {
  border-top: 1px solid var(--rule);
}

.section--app {
  background: var(--ivory-deep);
}

.section--faq {
  border-top: 1px solid var(--rule);
}

/* Steps */

.steps {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.step:last-child {
  border-bottom: 1px solid var(--rule);
}

.step__num {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--burgundy);
  padding-top: 0.2rem;
}

.step__title {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.step__text {
  color: var(--muted);
  max-width: 38ch;
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 clamp(2rem, 4vw, 4.5rem);
  }

  .step {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 2.25rem 0 0;
    border-bottom: 0;
  }

  .step:last-child {
    border-bottom: 0;
  }

  .step__num {
    font-size: 2.75rem;
    margin-bottom: 2.5rem;
  }

  .step:nth-child(2) {
    margin-top: 3.5rem;
  }
}

/* App showcase */

.showcase {
  display: grid;
  gap: 3rem;
}

.showcase__item {
  display: grid;
  gap: 0;
}

.phone {
  width: min(100%, 300px);
  margin: 0 auto 1.75rem;
  padding: 9px;
  border-radius: 42px;
  background: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 48px -28px rgba(33, 27, 25, 0.45);
}

.phone__screen {
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 640 / 1387;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.showcase__title {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  text-align: center;
}

.showcase__text {
  color: var(--muted);
  text-align: center;
  max-width: 34ch;
  margin-inline: auto;
  text-wrap: pretty;
}

@media (max-width: 899px) {
  /* Horizontal editorial scroller on small screens; page never overflows. */
  .showcase {
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 320px);
    gap: 1.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 1rem;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .showcase::-webkit-scrollbar {
    display: none;
  }

  .showcase__item {
    scroll-snap-align: start;
  }

  .phone {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }

  .showcase__item--offset {
    margin-top: 4.5rem;
  }
}

/* Wardrobe editorial */

.wardrobe {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.wardrobe__figure {
  margin: 0;
}

.wardrobe__figure img {
  width: 100%;
  background: var(--ivory-deep);
}

.features {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.feature {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.feature:last-child {
  border-bottom: 1px solid var(--rule);
}

.feature__title {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.feature__text {
  color: var(--muted);
  max-width: 44ch;
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .wardrobe {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 7rem);
  }

  .wardrobe__figure {
    margin-left: calc(-1 * var(--gutter));
  }
}

/* FAQ */

.faq {
  display: grid;
  gap: 3rem;
}

.faq__list {
  border-top: 1px solid var(--rule);
}

.faq__item {
  border-bottom: 1px solid var(--rule);
}

.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  color: var(--burgundy);
}

.faq__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 220ms var(--ease);
}

.faq__icon::before {
  left: 0;
  right: 0;
  top: 7.25px;
  height: 1.5px;
}

.faq__icon::after {
  top: 0;
  bottom: 0;
  left: 7.25px;
  width: 1.5px;
}

.faq__item[open] .faq__icon::after {
  transform: rotate(90deg);
}

.faq__a {
  padding: 0 0 1.6rem;
  color: var(--muted);
  max-width: 62ch;
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .faq {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(3rem, 6vw, 7rem);
    align-items: start;
  }

  .faq__head {
    position: sticky;
    top: 6rem;
  }
}

/* Closing */

.closing {
  background: var(--burgundy);
  color: var(--ivory);
  padding-block: clamp(4.5rem, 10vw, 8rem);
  text-align: center;
}

.closing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing__icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
}

.closing__title {
  color: var(--ivory);
  font-size: clamp(2.25rem, 1.4rem + 3.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.closing__text {
  margin-top: 1.25rem;
  max-width: 40ch;
  color: rgba(246, 241, 232, 0.82);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.closing .button {
  margin-top: 2.25rem;
}

.closing__note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(246, 241, 232, 0.72);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ivory);
  border-top: 1px solid var(--rule);
  padding-block: 3rem 3.5rem;
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.125rem;
}

.site-footer__brand .wordmark__mark {
  width: 24px;
  height: 24px;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  list-style: none;
}

.site-footer__nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.1rem;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}

.site-footer__nav a:hover {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

.site-footer__meta {
  color: var(--muted);
  font-size: 0.875rem;
  display: grid;
  gap: 0.35rem;
}

@media (min-width: 900px) {
  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 3rem;
  }

  .site-footer__nav {
    justify-self: center;
  }

  .site-footer__meta {
    text-align: right;
  }
}

/* --------------------------------------------------------------------------
   Reveal (progressive enhancement, motion-safe only)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 640ms var(--ease), transform 640ms var(--ease);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .nav-toggle,
  .lang-switch,
  .closing {
    display: none;
  }

  .faq__item {
    break-inside: avoid;
  }

  .faq__a {
    display: block;
  }
}
