/* GearBnB NFC card. Palette, type and button style follow the GearBnB website (public/brand_assets/Guidelines.png). */
:root {
  --forest: #2d5a46;
  --forest-dark: #264d3c;
  --brown: #4b3425;
  --cream: #f1e3c6;
  --page: #faf6ec;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --radius: 1.125rem; /* the website's rounded-2xl */
  --serif: "Playfair Display", ui-serif, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 24px; height: 24px; flex: none; }
svg use { pointer-events: none; }
/* Line icons by default (the website's iconography); the Facebook/TikTok glyphs are solid like on the website. */
symbol, svg:not(.sprite) { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.fill { fill: currentColor; stroke: none; }

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

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--forest); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---- the card: a centred phone-width column ---- */
.card {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--page);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
@media (min-width: 520px) {
  body { padding: 28px 0; }
  /* No overflow clipping on the whole card (it made the browser mask a huge area while scrolling): the cover rounds
     its own top corners, and the card keeps a light shadow. */
  .card { min-height: 0; border-radius: 28px; box-shadow: 0 10px 28px rgba(46, 31, 22, 0.16); }
  .cover { border-radius: 28px 28px 0 0; }
}

/* ---- cover + identity ---- */
.cover { position: relative; aspect-ratio: 5 / 2; background: #0c1a33; overflow: hidden; } /* the banner is 1600 x 640 (5:2); shown whole, never cropped */
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.cover-shade { display: none; } /* the banner already has its own dark background; no extra tint */

.identity { text-align: center; padding: 0 24px; margin-top: -38px; position: relative; } /* the photo only touches the banner's lower edge, so the film strip stays visible */
.avatar-wrap { position: relative; width: 128px; height: 128px; margin: 0 auto 14px; }
.avatar {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--page);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.22);
  background: var(--forest-dark);
}
/* the GearBnB logo, small, on the corner of the photo */
.brand-badge {
  position: absolute; right: -4px; bottom: 2px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--page); box-shadow: 0 3px 10px rgba(17, 24, 39, 0.28); background: #fff;
}
h1 { font-family: var(--serif); font-weight: 700; font-size: 2rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.tagline { margin-top: 4px; font-size: 1rem; line-height: 1.35; color: var(--ink); font-weight: 500; text-wrap: balance; }
/* The email sits close under the title. Its tap area is widened with an invisible layer (::after), so the text
   stays tight to the title while the link is still easy to tap with a thumb. */
.area { margin-top: 6px; font-size: 0.9375rem; line-height: 1.35; }
.area a { position: relative; display: inline-block; color: var(--forest); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.area a::after { content: ""; position: absolute; inset: -12px -14px; }
.area a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- link buttons ---- */
main { padding: 26px 20px 4px; }
.links { display: grid; gap: 12px; }

.btn {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 16px 10px 10px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s, background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: rgba(45, 90, 70, 0.45); box-shadow: 0 6px 16px rgba(17, 24, 39, 0.09); }
.btn:active { transform: scale(0.985); }
.btn .ico {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(45, 90, 70, 0.1); color: var(--forest);
}
.btn .txt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.btn .label { font-weight: 600; font-size: 1rem; line-height: 1.25; }
.btn .sub { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.btn .go { width: 20px; height: 20px; color: var(--muted); }

/* The supplied round brand badges (assets/icons). */
.btn .badge { width: 44px; height: 44px; flex: none; border-radius: 50%; }

/* the website's green "Reserve Gear" button */
.btn-primary { background: var(--forest); border-color: var(--forest); color: #fff; box-shadow: 0 6px 16px rgba(45, 90, 70, 0.28); }
.btn-primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); box-shadow: 0 8px 20px rgba(45, 90, 70, 0.34); }
/* a white ring keeps the blue badge clear of the green */
.btn-primary .badge { background: #fff; padding: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5); }
.btn-primary .sub { color: rgba(255, 255, 255, 0.88); }
.btn-primary .go { color: #fff; }

/* ---- camp setups ---- */
.setups { margin-top: 30px; }
.setups h2 { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.2; }
.setups-note { margin-top: 2px; font-size: 0.875rem; color: var(--muted); }

.strip {
  display: flex; gap: 12px; margin: 14px -20px 0; padding: 4px 20px 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip li { flex: none; width: 62%; max-width: 236px; scroll-snap-align: start; }
.shot {
  display: block; text-decoration: none; color: var(--ink);
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
  transition: box-shadow 0.15s, transform 0.1s;
}
.shot:hover { box-shadow: 0 6px 16px rgba(17, 24, 39, 0.1); }
.shot:active { transform: scale(0.985); }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--cream); }

.more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 10px 2px;
  font-weight: 600; font-size: 0.9375rem; color: var(--forest); text-decoration: none; min-height: 44px;
}
.more svg { width: 18px; height: 18px; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn-save { margin-top: 22px; background: transparent; box-shadow: none; border-color: rgba(45, 90, 70, 0.4); }
.btn-save:hover { background: var(--surface); }

footer { text-align: center; padding: 26px 20px 8px; font-size: 0.8125rem; color: var(--muted); }
footer a { font-weight: 600; text-decoration: none; color: var(--forest); }
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
footer p { margin-top: 2px; }

/* ---- desktop: the card grows with the screen (up to 880 px). Phones are unchanged. ---- */
.card { container-type: inline-size; container-name: card; }

@media (min-width: 760px) {
  body { padding: 44px 0; }
  .card { width: min(880px, calc(100% - 64px)); max-width: none; border-radius: 32px; }
  .cover { border-radius: 32px 32px 0 0; }
  .identity { margin-top: -56px; }
  .avatar-wrap { width: 152px; height: 152px; margin-bottom: 18px; }
  .avatar { width: 152px; height: 152px; border-width: 5px; }
  .brand-badge { width: 54px; height: 54px; right: -4px; bottom: 6px; }
  h1 { font-size: 2.625rem; }
  .tagline { margin-top: 6px; font-size: 1.125rem; }
  .area { margin-top: 8px; font-size: 1.0625rem; }
  main { padding: 34px 48px 6px; }
  .btn { min-height: 70px; padding-right: 20px; }
  .btn .label { font-size: 1.0625rem; }
  .btn .sub { font-size: 0.875rem; }
  .setups { margin-top: 42px; }
  .setups h2 { font-size: 1.875rem; }
  .btn-save { margin-top: 28px; }
  footer { padding-top: 34px; padding-bottom: 18px; }
}

/* Columns follow the card's own width, so they also work at in-between window sizes: from 700 px the camping photos
   become a grid (nothing to scroll with a mouse); from 800 px the links go two to a row under the website button. */
@container card (min-width: 800px) {
  .links { grid-template-columns: 1fr 1fr; gap: 14px; }
  .links li:first-child { grid-column: 1 / -1; }
}
@container card (min-width: 700px) {
  .setups-note { display: none; } /* "Swipe through" only makes sense on a touch screen */
  .strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .strip li { width: auto; max-width: none; }
  .shot { transition: box-shadow 0.15s, transform 0.15s; }
  .shot:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(17, 24, 39, 0.14); }
  .more { margin-top: 12px; }
}

/* ---- wide desktop (1000 px and up): a bigger card with the profile and the stacked buttons on the left, and the
   camping photos on the right. Same text, fonts and colours; only the arrangement changes.
   (Phones and small windows are not affected.) ---- */
@media (min-width: 1000px) {
  .card {
    width: min(1120px, calc(100% - 64px));
    display: grid;
    grid-template-columns: minmax(400px, 5fr) minmax(0, 7fr);
    align-items: start;
  }
  main { display: contents; } /* its pieces (links, camping photos, save button) join the card's grid directly */

  .cover { grid-column: 1 / -1; grid-row: 1; }

  /* left: the profile (left-aligned), then the buttons stacked right under it, then the save button */
  .identity { grid-column: 1; grid-row: 2; text-align: left; margin-top: -64px; padding: 0 20px 0 44px; }
  .avatar-wrap { margin-left: 0; margin-right: 0; }
  .brand-badge { bottom: 8px; }
  .links { grid-column: 1; grid-row: 3; grid-template-columns: 1fr; gap: 14px; padding: 26px 20px 0 44px; }
  .links li:first-child { grid-column: auto; }
  .btn-save { grid-column: 1; grid-row: 4; margin: 14px 20px 0 44px; }

  /* right: the camping photos. The heading starts level with the name; the tiles stretch to end level with the last
     button; the "Learn More" link sits on the same row as Save contact. So both columns share a top and a bottom. */
  .setups { grid-column: 2; grid-row: 2 / 5; align-self: stretch; margin-top: 0; padding: 112px 48px 0 20px; display: flex; flex-direction: column; }
  .strip { flex: 1 1 0; min-height: 0; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
  .strip li { height: 100%; min-height: 0; }
  .shot { position: relative; height: 100%; }
  .shot img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: center 62%; }
  .more { align-self: flex-start; margin-top: 14px; min-height: 70px; padding: 0 2px; }

  footer { grid-column: 1 / -1; grid-row: 5; }
}

/* ---- photo viewer ---- */
dialog {
  padding: 0; border: 0; background: transparent; color: #fff;
  width: 100%; max-width: 100vw; height: 100%; max-height: 100dvh; margin: 0;
}
dialog::backdrop { background: rgba(17, 24, 39, 0.94); }
dialog[open] { display: grid; place-items: center; }
.lb-fig { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 64px 16px 72px; max-width: 100%; }
.lb-fig img { max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; border-radius: 14px; object-fit: contain; background: #000; }
.lb-fig figcaption { text-align: center; font-size: 0.9375rem; font-weight: 600; max-width: 34rem; }
.lb-count { font-weight: 400; opacity: 0.8; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.26); }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lb-prev, .lb-next { bottom: max(16px, env(safe-area-inset-bottom)); }
.lb-prev { left: calc(50% - 60px); }
.lb-next { right: calc(50% - 60px); }
@media (min-width: 720px) {
  .lb-prev, .lb-next { bottom: auto; top: 50%; transform: translateY(-50%); }
  .lb-prev { left: 24px; }
  .lb-next { right: 24px; }
}

/* The photo scales up slightly as it fades in, like the website's camp-setup gallery. */
@keyframes zoomIn { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: scale(1); } }
dialog[open] .lb-fig { animation: zoomIn 240ms cubic-bezier(0.22, 1, 0.36, 1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
