/* Wise Crow Gifting & Merch — mobile first (design: 390px), desktop from 768px (design: 1440px) */

:root {
  --base: #3a1405;
  --pink: #f1c1c0;
  --salmon: #e7a495;
  --rust: #7f2c10;
  --white: #fff;
  --gutter: 8px;
  /* 0.5px borders can drop out on some phones (left/right edges vanish), so mobile uses a 1px line at reduced opacity */
  --hair: 1px dashed var(--salmon);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--base);
  color: var(--salmon);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- background: gradient image + lens-flare video ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  isolation: isolate;
  background: var(--base) var(--bg-mobile) center top / cover no-repeat;
}

.bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bg__video { display: none; }
}

/* ---------- page shell ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.page > main { flex: 1; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.nav__logo {
  position: relative;
  display: block;
  width: 68px;
  aspect-ratio: 124 / 95;
  overflow: hidden;
}

/* the Figma logo frame crops the artwork slightly */
.nav__logo img {
  position: absolute;
  max-width: none;
  height: 119.23%;
  width: 112.69%;
  left: -12.23%;
  top: -9.62%;
}

.nav__link {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 2px 0;
  transition: opacity 0.2s;
}
.nav__link:hover, .nav__link:focus-visible { opacity: 0.7; }

.social {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  font-size: 10px;
  font-weight: 700;
}
.social a { padding: 4px 0; transition: opacity 0.2s; }
.social a:hover, .social a:focus-visible { opacity: 0.7; }

a:focus-visible, button:focus-visible { outline: 1px dashed var(--pink); outline-offset: 4px; }

/* ---------- home ---------- */

.home { margin-top: 85px; }

html, body { overflow-x: clip; }

.home__tag { font-size: 12px; font-weight: 500; }

.home__about { margin-top: 15px; font-size: min(16px, 4.3vw); font-weight: 500; line-height: 1.4; }
/* line breaks are fixed to the design: <br class="br-m"> on mobile, <br class="br-d"> on desktop; lines never re-wrap */
.home__about { white-space: nowrap; }
.br-d { display: none; }
.home__about strong { font-weight: 700; }

.label { font-size: 10px; font-weight: 400; line-height: normal; }

.services { margin-top: 40px; }
.services__cols { margin-top: 8px; display: grid; gap: 15px; }

.service h3 { font-size: 10px; font-weight: 600; line-height: normal; }
.service__line { margin-top: 5px; font-size: 8px; font-weight: 200; font-style: italic; line-height: normal; }
.service ul { margin-top: 5px; font-size: 11px; font-weight: 200; }

.partners { margin-top: 40px; }
.partners__grid {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* full-bleed: break out of the page gutter, edge to edge */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.partners__grid--desktop { display: none; }

.partners__marquee {
  --logo-h: 24px;
  --row-gap: 20px;
  overflow: hidden;
}

.partners__track {
  display: flex;
  width: max-content;
  /* speed scales with row length (--n = total logo aspect ratio, set per row) */
  animation: partners-scroll calc(var(--n) * 1.1s) linear infinite;
}

.partners__marquee.is-reverse .partners__track { animation-direction: reverse; }
.partners__marquee:hover .partners__track { animation-play-state: paused; }

@keyframes partners-scroll {
  to { transform: translateX(-50%); }
}

.partners__row {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--row-gap);
  padding-right: var(--row-gap);
}

.partners__logo {
  flex: none;
  height: calc(var(--logo-h) * var(--s, 1));
}

.partners__logo img {
  display: block;
  height: 100%;
  width: auto;
}

.partners__logo.is-flipped img { transform: scaleY(-1); }

@media (prefers-reduced-motion: reduce) {
  .partners__track { animation: none; }
  .partners__marquee { overflow-x: auto; }
  .partners__row[aria-hidden] { display: none; }
}

/* ---------- contact ---------- */

.contact { margin-top: 100px; }

.crumbs { font-size: 8px; font-weight: 600; color: var(--pink); }
.crumbs a:hover { text-decoration: underline; }

.pillars { margin-top: 18px; display: grid; gap: 18px; }
.pillars h2 { font-size: 10px; font-weight: 600; line-height: 1.3; }
.pillars p { font-size: 10px; font-weight: 400; line-height: 1.3; }
.pillars > :nth-child(1) { order: 1; }
.pillars > :nth-child(3) { order: 2; }
.pillars > :nth-child(2) { order: 3; }
.pillars > :nth-child(4) { order: 4; }

.enquiry { margin-top: 50px; }

.enquiry__title { font-size: 8px; font-weight: 500; color: var(--pink); margin-bottom: 8px; }

.field {
  display: flex;
  align-items: center;
  height: 60px;
  margin-bottom: 8px;
  padding: 0 24px 0 14px;
  border: var(--hair);
  cursor: text;
  transition: background-color 0.2s, border-color 0.2s;
}
.field:focus-within { background: rgba(255, 255, 255, 0.07); border-style: solid; }
.field--area { height: 100px; align-items: flex-start; padding-top: 18px; }
.field.is-invalid { border-color: var(--pink); border-style: solid; background: rgba(241, 193, 192, 0.1); }

.field > input,
.field > textarea,
.field .iti__tel-input {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--salmon);
  font: inherit;
  font-size: 16px; /* >=16px stops iOS zooming on focus */
  font-weight: 300;
  line-height: 1.2;
  resize: none;
}
.field--area > textarea { height: 100%; }

.field > input::placeholder,
.field > textarea::placeholder,
.field .iti__tel-input::placeholder { color: var(--salmon); font-weight: 100; opacity: 1; }

.field > input:-webkit-autofill,
.field .iti__tel-input:-webkit-autofill {
  -webkit-text-fill-color: var(--white);
  transition: background-color 9999s ease-in-out 0s;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.enquiry__status { min-height: 1.3em; margin: 4px 0 12px; font-size: 14px; color: var(--pink); }
.enquiry__status.is-ok { color: #fff; font-weight: 500; }

.enquiry__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--rust);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}
.enquiry__submit:hover { background: var(--pink); }
.enquiry__submit[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- intl-tel-input, themed ---------- */

.field--tel { padding: 0; }
.field--tel .iti { width: 100%; height: 100%; display: block; }

:root {
  --iti-border-color: rgba(255, 255, 255, 0.55);
  --iti-country-selector-bg: #3a2723;
  --iti-hover-color: rgba(241, 193, 192, 0.16);
  --iti-icon-color: var(--white);
  --iti-spacer-horizontal: 14px;
  --iti-arrow-padding: 6px;
}

.field--tel .iti__tel-input {
  height: 100%;
  padding-right: 24px;
}

.iti__selected-dial-code { color: var(--white); font-weight: 300; margin-left: 6px; }
.iti__arrow { border-top-color: var(--white); }
.iti__arrow--up { border-bottom-color: var(--white); }
.iti__country-container:hover .iti__selected-country { background: transparent; }
.iti__selected-country:focus-visible { outline: 1px dashed var(--pink); outline-offset: -2px; }

/* dropdown (appended to <body>, so it can't inherit .field styles) */
.iti__country-selector {
  margin-top: 6px;
  background: #3a2723;
  color: var(--salmon);
  font-family: "Inter", system-ui, sans-serif;
  border: var(--hair);
  border-radius: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.iti__search-input-wrapper { border-bottom: var(--hair); }
.iti__search-input {
  background: transparent;
  color: var(--white);
  border: 0;
  border-radius: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 300;
}
.iti__search-input::placeholder { color: rgba(255, 255, 255, 0.65); font-weight: 200; }
.iti__country { font-weight: 300; }
.iti__country-name { font-weight: 300; }
.iti__country .iti__dial-code { color: rgba(255, 255, 255, 0.6); }
.iti__highlight { background: rgba(241, 193, 192, 0.16); }
.iti__no-results { color: rgba(255, 255, 255, 0.7); }
.iti__country-list { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.4) transparent; }
.iti__country-check-svg { stroke: var(--pink); }

@media (min-width: 768px) {
  .iti__country-selector { max-width: 380px; }
}

/* ---------- desktop ---------- */

@media (min-width: 768px) {
  :root { --gutter: 24px; --hair: 0.5px dashed var(--salmon); }

  .bg { background-image: url("../assets/img/bg-home.webp?v=2"); }
  .page-contact .bg { background-image: url("../assets/img/bg-contact.webp?v=2"); }

  .nav__logo { width: clamp(88px, 8.6vw, 124px); }
  .nav__link { font-size: clamp(12px, 1.04vw, 15px); font-weight: 600; }

  .social { margin-top: 60px; font-size: 11px; font-weight: 600; }

  /* home */
  .home { margin-top: clamp(60px, 8.5vw, 123px); }
  .home__tag { font-size: clamp(15px, 1.39vw, 20px); line-height: 1.3; }
  .home__about {
    margin-top: clamp(20px, 1.8vw, 26px);
    font-size: clamp(17px, 1.67vw, 24px);
    font-weight: 400;
    line-height: 1.3;
  }
  .home__about strong { font-weight: 600; }
  .home__about p { display: inline; }
  .br-m { display: none; }
  .br-d { display: inline; }

  .label { font-size: clamp(12px, 1.11vw, 16px); font-weight: 300; }

  .services { margin-top: 60px; }
  .services__cols { margin-top: 40px; grid-template-columns: 1fr 2fr; gap: 24px; }
  .service h3 { font-size: clamp(12px, 1.11vw, 16px); }
  .service__line { margin-top: 8px; font-size: clamp(12px, 1.11vw, 16px); }
  .service ul { margin-top: 8px; font-size: clamp(13px, 1.25vw, 18px); }

  .partners { margin-top: 60px; }
  .partners__grid { margin-top: 16px; gap: 18px; }
  .partners__grid--mobile { display: none; }
  .partners__grid--desktop { display: flex; }
  .partners__marquee { --logo-h: clamp(26px, 3vw, 44px); --row-gap: clamp(28px, 3.5vw, 56px); }

  /* contact */
  .contact { margin-top: clamp(40px, 4.5vw, 65px); }
  .crumbs { font-size: 10px; }

  .pillars {
    margin-top: clamp(20px, 2.4vw, 34px);
    grid-template-columns: 55.5% 1fr;
    column-gap: 0;
    row-gap: 40px;
  }
  .pillars > * { order: 0 !important; }
  .pillars h2 { font-size: clamp(14px, 1.53vw, 22px); text-transform: uppercase; }
  .pillars p { font-size: clamp(14px, 1.53vw, 22px); font-weight: 300; max-width: 21em; text-wrap: balance; }

  .enquiry { margin-top: clamp(48px, 6.7vw, 96px); }
  .enquiry__title { font-size: clamp(15px, 1.39vw, 20px); font-weight: 700; margin-bottom: 24px; }
  :root { --iti-spacer-horizontal: 24px; }
  .field { height: clamp(52px, 4.8vw, 69px); margin-bottom: 35px; padding-left: 24px; }
  .field--tel { padding: 0; }
  .field--area { height: clamp(120px, 11.25vw, 162px); padding-top: 24px; }
  .field > input, .field > textarea, .field .iti__tel-input { font-size: clamp(16px, 1.39vw, 20px); }
  .enquiry__status { margin: -12px 0 14px; font-size: 16px; }
  .enquiry__submit {
    height: clamp(64px, 6.25vw, 90px);
    justify-content: flex-start;
    font-size: clamp(16px, 1.39vw, 20px);
  }
}
