/* aivirtualtours.ca home page and 404. Hand-written; tools/sync-from-builtbyai.mjs does not touch it.
   Palette and type match the tours (tour.css) so the home page and the tours read as one site. */

:root {
  --night:    #12100d;
  --night-2:  #1c1915;
  --night-3:  #26221d;
  --on-night: #f4efe6;
  --on-night-2: rgba(244, 239, 230, .78);
  --on-night-3: rgba(244, 239, 230, .62);
  --line:     rgba(255, 255, 255, .12);
  --line-2:   rgba(255, 255, 255, .22);
  --copper:   #96542a;
  --copper-2: #e2a877;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --gl: max(var(--gutter), env(safe-area-inset-left, 0px));
  --gr: max(var(--gutter), env(safe-area-inset-right, 0px));
  --maxw: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.skip {
  position: absolute; left: var(--gl); top: -4rem; z-index: 20;
  background: var(--copper-2); color: #1a120a; padding: .6rem 1rem; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: .75rem; }

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

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gl) var(--gr); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 16, 13, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; min-width: 0; padding-block: .5rem; }
.brand svg { flex: none; width: 28px; height: 28px; color: var(--copper-2); }
.brand b { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; letter-spacing: .01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 1.8rem); font-size: .95rem; font-weight: 600; }
.nav a { text-decoration: none; color: var(--on-night-2); }
.nav a:not(.btn) { padding-block: .65rem; }
.nav a:hover { color: var(--on-night); }
.nav .btn { color: #1a120a; }
.nav .btn:hover { color: #1a120a; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn--primary { background: var(--copper-2); color: #1a120a; }
.btn--primary:hover { background: #ecb98c; transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-2); color: var(--on-night); }
.btn--ghost:hover { border-color: var(--on-night-2); transform: translateY(-1px); }
.btn--small { min-height: 44px; padding: .45rem 1.1rem; font-size: .92rem; white-space: nowrap; }

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(4.5rem, 12vw, 9.5rem) clamp(3.5rem, 9vw, 7rem);
  background:
    radial-gradient(60% 70% at 78% 8%, rgba(226, 168, 119, .20), transparent 70%),
    radial-gradient(50% 60% at 6% 100%, rgba(95, 134, 168, .16), transparent 70%),
    var(--night);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 1.1rem; color: var(--copper-2);
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; max-width: 14ch;
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.9rem, 9vw, 6.4rem); line-height: 1.02; letter-spacing: -.015em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 300; color: var(--copper-2); }
.lead { margin: 1.6rem 0 0; max-width: 34em; font-size: clamp(1.08rem, 2.3vw, 1.3rem); color: var(--on-night-2); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section h2 {
  margin: 0 0 .8rem; max-width: 20ch;
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4.8vw, 3.1rem); line-height: 1.1; letter-spacing: -.01em;
  text-wrap: balance;
}
.section .sub { margin: 0 0 clamp(1.8rem, 4vw, 3rem); max-width: 40em; color: var(--on-night-2); }

/* What's in a tour */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li {
  padding: 1.5rem 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--night-2), var(--night));
}
.features svg { width: 30px; height: 30px; color: var(--copper-2); margin-bottom: .9rem; }
.features h3 { margin: 0 0 .4rem; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.2; }
.features p { margin: 0; color: var(--on-night-2); font-size: 1rem; }

/* Live tours */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
/* Two across on tablets, with the odd third card centred under them; three across on desktop. */
@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards .card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - .6rem); }
}
@media (min-width: 64rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards .card:last-child:nth-child(odd) { grid-column: auto; justify-self: stretch; width: auto; }
}
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--night-2);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card:focus-within { border-color: var(--copper-2); }
/* The share cards have the title painted in, so show them whole, never cropped. */
.card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: contain; background: var(--night-3); }
.card__body { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.card__kind { margin: 0; color: var(--copper-2); font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.card h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.2; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--on-night-2); font-size: .98rem; }
.card__go { margin-top: auto; padding-top: .8rem; font-weight: 700; color: var(--copper-2); }
.credit { margin: 1.6rem 0 0; max-width: 52em; color: var(--on-night-3); font-size: .88rem; line-height: 1.55; }

.eyebrow, .card__kind, .card h3, .cta .sub { text-wrap: balance; }
.lead, .section .sub, .features p, .card p { text-wrap: pretty; }

/* Closing call */
.cta { text-align: center; background: radial-gradient(70% 90% at 50% 0%, rgba(226, 168, 119, .13), transparent 70%), var(--night); }
.cta h2 { margin-inline: auto; max-width: 16ch; }
.cta .sub { margin-inline: auto; }
.cta .actions { justify-content: center; margin-top: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 2.2rem calc(2.2rem + env(safe-area-inset-bottom, 0px)); color: var(--on-night-3); font-size: .9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; }
.foot p { margin: 0; }
.foot a { color: var(--on-night-2); }
.foot a:hover { color: var(--on-night); }

/* 404 */
.lost { min-height: calc(100vh - 65px); min-height: calc(100svh - 65px); display: grid; align-items: center; }
.lost .hero { background: none; border: 0; padding-block: 3rem; }
.lost h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); max-width: 16ch; }

/* Entrance, once. Skipped for anyone who asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > * { animation: rise .8s var(--ease) both; }
  .hero .wrap > :nth-child(2) { animation-delay: .08s; }
  .hero .wrap > :nth-child(3) { animation-delay: .16s; }
  .hero .wrap > :nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

/* Phones: keep the bar to the wordmark and the one button. */
@media (max-width: 36rem) {
  .nav a:not(.btn) { display: none; }
  .brand b { font-size: 1.1rem; }
  .actions .btn { flex: 1 1 100%; }
}
@media (max-width: 22.5rem) {
  .brand svg { display: none; }
}
