/* HikeStash website. Colours and type follow the app's design system. */

/* Parts of the page for a feature whose app flag is off (see seo/site.mjs) */
[hidden] { display: none !important; }

:root {
  --ground: #EDE8DD;
  --paper: #FBF9F4;
  --sage: #E4E6D6;
  --ink: #2A2620;
  --ink-strong: #201D17;
  --text: #4A4536;
  --nav: #3A3527;
  --muted: #6E6857;
  --line: #DDD5C0;
  --line-soft: #E3DCC9;
  --dot: #C9C0A8;
  --forest: #3A4530;
  --forest-text: #EDE8DD;
  --forest-muted: #B9BFA0;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --gutter: 160px;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.container {
  max-width: calc(1120px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--forest-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand--sm { font-size: 13px; letter-spacing: 0; color: var(--ink); }
.brand--sm .brand-mark { width: 22px; height: 22px; border-radius: 7px; }
.brand--sm .brand-mark svg { width: 13px; height: 13px; }

/* App Store badge */

.app-store {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 54px;
  padding: 0 19px 0 16px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  flex-shrink: 0;
}
.app-store svg { width: 28px; height: 28px; fill: #fff; flex-shrink: 0; }
.app-store-text { display: flex; flex-direction: column; line-height: 1; }
.app-store-text span:first-child { font-size: 10.8px; letter-spacing: .02em; }
.app-store-text span:last-child { font-size: 21.6px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; }
.app-store--sm { height: 40px; padding: 0 14px 0 12px; border-radius: 9px; gap: 9px; }
.app-store--sm svg { width: 21px; height: 21px; }
.app-store--sm .app-store-text span:first-child { font-size: 8px; }
.app-store--sm .app-store-text span:last-child { font-size: 16px; }
.app-store[aria-disabled="true"] { cursor: default; }

/* Header */

.site-header { border-bottom: .5px solid var(--line); position: relative; z-index: 10; }
.header-row { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: 14px; color: var(--nav); }
.site-nav a:not(.app-store):hover { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 4px; }
.menu-button { display: none; }

/* Phone frame. The screenshot fills the screen; see website/README.md. */

.phone {
  width: 260px;
  border-radius: 40px;
  background: var(--ink-strong);
  padding: 8px;
  flex-shrink: 0;
  box-shadow: 0 24px 50px rgba(32, 29, 23, .28), 0 4px 12px rgba(32, 29, 23, .12);
}
.phone img {
  width: 244px;
  aspect-ratio: 244 / 529;
  height: auto;
  border-radius: 32px;
  object-fit: cover;
  object-position: top center;
  background: var(--ground);
}

/* Hero */

.hero-row { min-height: 680px; display: flex; align-items: center; gap: 60px; }
.hero-text { flex: 1; min-width: 0; }
.hero h1 { margin-top: 14px; font-size: 64px; font-weight: 700; line-height: 1.02; letter-spacing: -.02em; }
.hero .eyebrow { font-size: 12px; }
.lede { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--text); max-width: 500px; }
.hero-cta { display: flex; align-items: center; gap: 18px; margin-top: 32px; }
.hero-note { font-size: 13px; color: var(--muted); }
.hero-art { position: relative; width: 520px; height: 620px; flex-shrink: 0; }
.hero-art .phone { position: absolute; }
.hero-art .phone--back { right: 250px; top: 58px; transform: rotate(-4deg); }
.hero-art .phone--front { right: 10px; top: 20px; transform: rotate(3deg); }

/* Features: full-width alternating rows on desktop, a swipeable carousel on phones */

.features-intro, .feature-tabs, .carousel-controls, .feature-count { display: none; }

.feature { border-top: .5px solid var(--line-soft); background: var(--paper); }
.feature:nth-child(even) { background: var(--ground); }
.feature-row { min-height: 640px; display: flex; align-items: center; justify-content: space-between; gap: 80px; }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-text { flex: 1; min-width: 0; max-width: 470px; }
.feature h3 { margin-top: 10px; font-size: 38px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.feature-text > p:not(.eyebrow) { margin-top: 14px; font-size: 16px; line-height: 1.55; color: var(--text); }
.feature-media { width: 460px; display: flex; justify-content: center; flex-shrink: 0; }

.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 8px; font-size: 14px; line-height: 1.4; }
.ticks li::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A4530' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Call to action */

.cta { border-top: .5px solid var(--line-soft); }
.cta .container { min-height: 380px; display: flex; align-items: center; }
.cta-card {
  flex: 1;
  min-height: 260px;
  padding: 40px 64px;
  border-radius: 28px;
  background: var(--forest);
  color: var(--forest-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta .eyebrow { color: var(--forest-muted); }
.cta h2 { margin-top: 10px; font-size: 42px; font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
.cta-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.cta-side .weight-bar { width: 360px; height: 10px; border-radius: 5px; }
.cta .app-store { height: 56px; }

/* The category weight bar from the app, using the design's sample split */
.weight-bar { display: flex; gap: 1px; overflow: hidden; background: rgba(237, 232, 221, .2); }
.weight-bar i { display: block; height: 100%; }
.weight-bar i:nth-child(1) { width: 20.52%; background: #818D4E; }
.weight-bar i:nth-child(2) { width: 16.84%; background: #5F9569; }
.weight-bar i:nth-child(3) { width: 16.49%; background: #B5716B; }
.weight-bar i:nth-child(4) { width: 11.52%; background: #538DB7; }
.weight-bar i:nth-child(5) { width: 9.88%; background: #A7729B; }
.weight-bar i:nth-child(6) { width: 8.47%; background: #9279B2; }
.weight-bar i:nth-child(7) { width: 5.39%; background: #AF7850; }
.weight-bar i:nth-child(8) { width: 4.18%; background: #9D8344; }
.weight-bar i:nth-child(9) { width: 3.08%; background: #3994A4; }
.weight-bar i:nth-child(10) { width: 2.52%; background: #7483BC; }
.weight-bar i:nth-child(11) { width: 1.1%; background: #3F9888; }

/* Footer */

.site-footer { border-top: .5px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-row { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; gap: 24px; margin-left: auto; }
.footer-links a:hover { color: var(--ink); }

/* Narrower desktops and tablets in landscape */

@media (max-width: 1300px) {
  :root { --gutter: 64px; }
}
@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .hero-art { zoom: .8; }
  .feature-row { gap: 48px; }
  .feature-media { width: auto; zoom: .85; }
  .cta-card { padding: 40px; }
  .cta-side .weight-bar { width: 260px; }
}

/* Phones and portrait tablets: the mobile design */

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .desktop-only { display: none; }

  .header-row { height: 60px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark svg { width: 15px; height: 15px; }
  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: relative;
    margin-right: -4px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .menu-button::before {
    content: "";
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: .5px solid var(--line);
    background: var(--paper);
  }
  .menu-button svg { position: relative; width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--ground);
    border-bottom: .5px solid var(--line);
    box-shadow: 0 12px 24px rgba(32, 29, 23, .08);
    font-size: 16px;
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a:not(.app-store) { padding: 13px 0; border-bottom: .5px solid var(--line-soft); }
  .site-nav .app-store { align-self: flex-start; margin-top: 16px; }

  .hero-row { min-height: 0; display: block; padding-top: 40px; padding-bottom: 26px; }
  .hero-text { max-width: 560px; }
  .hero .eyebrow { font-size: 11px; }
  .hero h1 { margin-top: 12px; font-size: 44px; line-height: 1.04; }
  .lede { margin-top: 16px; font-size: 16px; }
  .hero-cta { gap: 14px; margin-top: 24px; }
  .hero-note { font-size: 12.5px; }
  .hero-cta .app-store { height: 50px; padding: 0 18px 0 15px; border-radius: 11px; }
  .hero-cta .app-store svg { width: 26px; height: 26px; }
  .hero-cta .app-store-text span:first-child { font-size: 10px; }
  .hero-cta .app-store-text span:last-child { font-size: 20px; }
  .hero-art { zoom: 1; width: auto; height: auto; margin-top: 40px; display: flex; justify-content: center; }
  .hero-art .phone { position: static; transform: none; }
  .hero-art .phone--back { display: none; }

  .features { padding: 44px 0 36px; background: var(--paper); border-top: .5px solid var(--line-soft); }
  .features-intro { display: block; padding: 0 20px; }
  .features-intro h2 { margin-top: 10px; font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
  .feature-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 18px 20px 4px;
    scrollbar-width: none;
  }
  .feature-tabs::-webkit-scrollbar, .carousel::-webkit-scrollbar { display: none; }
  .feature-tabs button {
    height: 32px;
    padding: 0 13px;
    border-radius: 16px;
    border: .5px solid var(--line);
    background: var(--ground);
    color: var(--nav);
    font: inherit;
    font-size: 12.5px;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
  }
  .feature-tabs button[aria-selected="true"] { background: var(--ink-strong); border-color: var(--ink-strong); color: #F5F1E8; }

  .carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 14px 36px 6px;
    scroll-padding: 0 36px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .feature {
    flex: 0 0 min(318px, calc(100vw - 72px));
    scroll-snap-align: center;
    background: var(--paper);
    border: .5px solid var(--line-soft);
    border-radius: 24px;
    overflow: hidden;
  }
  .feature:nth-child(even) { background: var(--paper); }
  .feature .container { padding: 0; }
  .feature-row { min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .feature-media, .feature:nth-child(even) .feature-media { order: -1; }
  /* flex-start: a stretched phone would end, with rounded corners, at the bottom of the card media */
  .feature-media { zoom: 1; width: auto; height: 430px; padding-top: 28px; overflow: hidden; align-items: flex-start; background: var(--sage); }
  .feature:nth-child(even) .feature-media { background: var(--ground); }
  .feature-text { max-width: none; padding: 20px 20px 24px; }
  .feature-count { display: inline; }
  .feature .eyebrow { font-size: 10.5px; }
  .feature h3 { margin-top: 8px; font-size: 24px; line-height: 1.15; letter-spacing: 0; }
  .feature-text > p:not(.eyebrow) { margin-top: 10px; font-size: 14px; line-height: 1.5; }
  .ticks { margin-top: 14px; gap: 8px; }
  .ticks li { font-size: 13px; }

  .carousel-controls { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0; }
  .carousel-controls button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: .5px solid var(--line);
    background: var(--ground);
    color: var(--ink);
    font: inherit;
    font-size: 18px;
    cursor: pointer;
  }
  .carousel-controls button:disabled { color: var(--dot); cursor: default; }
  .carousel-dots { display: flex; gap: 6px; }
  .carousel-dots i { display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--dot); transition: width .2s; }
  .carousel-dots i.is-active { width: 18px; background: var(--ink-strong); }

  .cta .container { min-height: 0; padding-top: 32px; padding-bottom: 32px; }
  .cta-card { padding: 28px 24px; border-radius: 24px; flex-direction: column; align-items: stretch; gap: 24px; }
  .cta .eyebrow { font-size: 10.5px; }
  .cta h2 { font-size: 32px; line-height: 1.1; letter-spacing: 0; }
  .cta-side { align-items: flex-start; gap: 24px; }
  .cta-side .weight-bar { width: 100%; height: 8px; border-radius: 4px; }
  .cta .app-store { height: 52px; padding: 0 19px 0 16px; border-radius: 11px; }
  .cta .app-store svg { width: 27px; height: 27px; }
  .cta .app-store-text span:first-child { font-size: 10.4px; }
  .cta .app-store-text span:last-child { font-size: 20.8px; }

  .footer-row { min-height: 150px; padding-top: 24px; padding-bottom: 24px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 16px; }
  .footer-links { margin-left: 0; gap: 20px; }
}

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