/* Styles for the homepage (index.html) and contact.html. Loaded after
   styles.css and overrides it. */

/* ---------- Gray palette ---------- */
/* Re-themes the shared sections by overriding the roles from styles.css. */
:root {
  --gray-1: #7D7B83;
  --gray-2: #97959C;
  --gray-3: #B1B0B5;
  --gray-4: #CBCACD;
  --gray-5: #E5E5E6;
  --near-black: #1E1D21;
  --near-white: #F7F7F8;

  --color-bg: var(--near-white);
  --color-text: var(--near-black);
  --color-text-muted: var(--gray-1);
  --color-border: var(--gray-4);
  --color-hairline: var(--gray-5);
  --color-icon-accent: var(--gray-2);
  --color-badge-bg: var(--gray-5);
  --color-badge-text: var(--near-black);

  --color-accent: var(--near-black);
  --color-on-accent: var(--near-white);
  --color-accent-soft: var(--gray-5);

  --color-dark-bg: var(--near-black);
  --color-on-dark: var(--near-white);
  --color-on-dark-muted: var(--gray-3);
  --color-on-dark-soft: var(--gray-4);
  --color-on-dark-rule: var(--gray-1);
  --color-overlay-rgb: 30, 29, 33;

  --font-heavy: "Inter Tight", var(--font-sans);
}

html, body { overflow-x: hidden; }

textarea { font-family: inherit; }

/* ---------- Header ---------- */
.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav .logo img { height: 36px; }

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--color-text); }

.nav-links a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Heavy headings ---------- */
.heavy {
  font-family: var(--font-heavy);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.92;
  color: var(--color-text);
  overflow-wrap: break-word;
}

/* ---------- Waitlist top ---------- */
.join {
  padding-top: 48px;
  padding-bottom: 72px;
  text-align: center;
}

.join-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  max-width: 1120px;
  margin: 0 auto 24px;
}

.join-sub {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

.join-form {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.join-form input[type="email"] {
  width: 100%;
  height: 60px;
  padding: 0 196px 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--gray-5);
  color: var(--color-text);
  font-size: 17px;
}

.join-form input[type="email"]::placeholder { color: var(--color-text-muted); }

.join-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--near-white);
}

/* The one primary button: dark, inside the right end of the email pill.
   (.join-form prefix so it wins over the generic .waitlist-form button.) */
.join-form .join-submit {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: var(--near-black);
  color: var(--near-white);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.join-submit:hover { opacity: 0.85; }
.join-submit:disabled { opacity: 0.5; cursor: default; }

.join-submit:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.join-success {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 0;
}

.join-success-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.join-success-note {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* One line under the email field. */
.join-hint {
  max-width: 480px;
  margin: 14px auto 0;
  font-size: 15px;
  color: var(--color-text-muted);
}

.reserve-outline {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.reserve-outline:hover { border-color: var(--color-accent); }

.reserve-outline:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- $1 reservation (hidden until clicked) ---------- */
/* One line of small text under the waitlist form. It is a <details>
   element, so the panel with the checkout button stays closed by default
   and opens only when the line is clicked (works without JavaScript). */
.reserve {
  max-width: 480px;
  margin: 18px auto 0;
}

.reserve-line {
  display: block;
  padding: 12px 0;
  list-style: none;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
}

.reserve-line::-webkit-details-marker { display: none; }

.reserve-line strong {
  font-weight: 700;
  color: var(--color-text);
}

.reserve-link {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reserve-line:hover .reserve-link { text-decoration-thickness: 2px; }

.reserve-line:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.reserve-panel {
  margin-top: 4px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #fff;
}

.reserve-panel-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 8px;
}

.reserve-panel-fine {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.reserve-panel-fine a { color: inherit; }

.reserve-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.reserve-age {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  color: var(--color-text);
  cursor: pointer;
}

.reserve-age input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--near-black);
}

/* Secondary weight on purpose: outline, not filled. */
.reserve-form .reserve-outline {
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Hero render ---------- */
/* The render sits on top of the waitlist section. On wide screens (1280px+)
   it fills the section behind the heading and form; below that it is a
   picture band with the heading and form underneath.

   .join-media-frame always keeps the image's own shape (1672 x 941) and is
   sized to cover .join-media, so anything placed inside it with % stays on
   the same spot of the photo however the photo is cropped.
     --fx / --fy  the point of the photo kept in the middle when cropping
     --bx / --by  where the price bubble's tail sits (just above-left of the
                  device), as % of the photo */

.join.has-media {
  position: relative;
  isolation: isolate;
  padding: 0 0 72px;
}

.join-media {
  position: relative;
  container-type: size;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  overflow: hidden;
  background: var(--near-black);
  --fx: 0.6;
  --fy: 0.5;
  --bx: 56%;
  --by: 46%;
}

.join-media-frame {
  --w: max(100cqw, 100cqh * 1.7768);
  --h: max(100cqh, 100cqw * 0.5628);
  position: absolute;
  width: var(--w);
  height: var(--h);
  left: clamp(100cqw - var(--w), 50cqw - var(--fx) * var(--w), 0px);
  top: clamp(100cqh - var(--h), 50cqh - var(--fy) * var(--h), 0px);
}

.join-media-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Price bubble: clear "glass" with a light tint and blur, sitting just
   above-left of the device. The tint keeps the white text at 4.5:1+. */
.join-price-tag {
  --glass: rgba(30, 29, 33, 0.45);
  position: absolute;
  z-index: 2;
  left: var(--bx);
  top: var(--by);
  transform: translate(-100%, -100%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 14px 21px;
  border-radius: 21px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.22);
  color: #fff;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.price-reserve {
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.price-ks {
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 700;
}

.join-media-label {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 29, 33, 0.7);
  color: var(--near-white);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.join-content {
  padding: 48px 24px 0;
}

@media (max-width: 640px) {
  .join.has-media { padding: 0 0 56px; }
  .join-content { padding: 32px 16px 0; }
  .join-media {
    aspect-ratio: 4 / 3;
    --fx: 0.62;
    --fy: 0.55;
    --bx: 75%;
    --by: 44%;
  }
  .join-price-tag { padding: 10px 16px; }
}

@media (max-width: 400px) {
  .reserve { margin-top: 8px; }
  .reserve-line { font-size: 13px; text-wrap: balance; }
  .join-price-tag { padding: 9px 13px; }
  .price-ks { font-size: 15px; }
  .price-reserve { font-size: 13px; }
}

@media (max-width: 359px) {
  .join-media { --bx: 80%; }
}

/* Wide screens: render behind the heading and form. */
@media (min-width: 1280px) {
  .join.has-media {
    display: flex;
    align-items: center;
    min-height: max(660px, min(56.25vw, 100vh - 108px));
    padding: 0;
  }

  .join-media {
    position: absolute;
    inset: 0;
    z-index: -1;
    aspect-ratio: auto;
    max-height: none;
    --fx: 0.5;
    --fy: 0.5;
    --bx: 58%;
    --by: 46%;
  }

  /* Darkens the sky on the left so the white text stays readable. */
  .join-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
      rgba(30, 29, 33, 0.68) 0%,
      rgba(30, 29, 33, 0.6) 34%,
      rgba(30, 29, 33, 0) 54%);
  }

  .join-content {
    --color-text: var(--near-white);
    --color-text-muted: var(--gray-5);
    --color-border: rgba(247, 247, 248, 0.45);
    color: var(--color-text);
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 64px clamp(48px, 5vw, 96px);
    text-align: left;
  }

  .join-content > * { max-width: 420px; }
  @media (max-width: 1399px) {
    /* Narrower column so the price bubble doesn't touch the email box. */
    .join-content > * { max-width: 400px; }
  }
  .join-title { margin: 0 0 20px; }
  .join-sub { margin: 0 0 28px; }
  .join-form { margin: 0; }
  .join-form input[type="email"] { color: var(--near-black); }
  .join-form input[type="email"]::placeholder { color: #66646C; }
  .join-success { margin: 0; }

  .join-content .waitlist-error {
    text-align: left;
    color: #FFD2CC;
  }

  .join-hint { margin: 14px 0 0; }
  .reserve { margin: 14px 0 0; }

  .join-content .reserve-panel {
    --color-text-muted: var(--gray-4);
    border-color: rgba(247, 247, 248, 0.18);
    background: rgba(30, 29, 33, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .join-content .reserve-form { align-items: flex-start; }
  .join-content .reserve-age input { accent-color: var(--near-white); }
  .join-content .reserve-outline:hover { border-color: var(--near-white); }

  .join-content .reserve-outline:focus-visible,
  .join-content .reserve-line:focus-visible,
  .join-content .join-submit:focus-visible {
    outline-color: var(--near-white);
  }
}

/* ---------- Render gallery ---------- */
/* Two rows, like Oliver's collage: front view + night scene, then sketch +
   six angles. Each image grows in proportion to its width-to-height shape,
   so images in the same row end up the same height and nothing is cropped. */
.gallery {
  background: #fff;
}

.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.gallery-row {
  display: flex;
  gap: 24px;
}

.gallery-row img {
  display: block;
  min-width: 0;
  height: auto;
}

/* flex-grow = the image's pixel width (both images in a row share a height). */
.gallery-front  { flex: 836 1 0; }
.gallery-night  { flex: 647 1 0; }
.gallery-sketch { flex: 568 1 0; }
.gallery-angles { flex: 922 1 0; }

/* Required label: these are renders, not product photos. */
.gallery-note {
  max-width: 1120px;
  margin: 16px auto 0;
  font-size: 13px;
  color: #66646C;
}

/* Phones: one image per row, full width. */
@media (max-width: 640px) {
  .gallery { padding: 64px 16px; }
  .gallery-grid,
  .gallery-row { gap: 12px; }
  .gallery-row { flex-direction: column; }
  .gallery-row img { flex: none; width: 100%; }
}

/* ---------- Hard truth ---------- */
/* Each sentence of the headline stays together, so the break falls between them. */
.truth-line { display: inline-block; }

/* ---------- Contact page ---------- */
.contact {
  max-width: 560px;
  margin: 0 auto;
  padding-top: 48px;
}

.contact-title {
  font-size: clamp(48px, 14vw, 96px);
  margin-bottom: 16px;
}

.contact-email {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.contact-email a { color: var(--color-text); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  color: var(--color-text);
  font-size: 16px;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-submit {
  align-self: flex-start;
  min-height: 52px;
  padding: 0 36px;
  border: none;
  border-radius: 999px;
  background: var(--near-black);
  color: var(--near-white);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.contact-submit:hover { opacity: 0.85; }
.contact-submit:disabled { opacity: 0.5; cursor: default; }

.contact-submit:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.contact .waitlist-error,
.contact .waitlist-success { text-align: left; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .site-nav { padding: 20px 16px; }
  .site-nav .logo img { height: 30px; }
  .join { padding: 32px 16px 56px; }
  .contact { padding: 32px 16px 80px; }
  .contact-submit { align-self: stretch; }
}

/* styles.css stacks .waitlist-form and stretches its button on phones;
   keep the button inside the pill instead, except on narrow phones. */
.waitlist-form.join-form { display: block; }
.join-form .join-submit { width: auto; }

/* Narrow phones: full-width button under the email field. */
@media (max-width: 420px) {
  .join-form input[type="email"] { padding: 0 20px; }
  .join-form .join-submit {
    position: static;
    width: 100%;
    height: 52px;
    margin-top: 10px;
  }
}

/* ---------- Hero muted text on the light background ---------- */
/* #7D7B83 on #F7F7F8 is only 3.9:1; #66646C passes 4.5:1. At 1280px and up,
   .join-content sets its own light value for text over the photo. */
.join.has-media { --color-text-muted: #66646C; }

/* ---------- Fine print in the "You're on the list" message ---------- */
.join-success-fine {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* The 18+ label now wraps to two lines: keep it a compact, left-aligned unit. */
.reserve-age { max-width: 320px; }
.reserve-age span { text-align: left; }

.join-success-fine a,
.reserve-age a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Footer links ---------- */
.footer-links {
  margin: 0 0 12px;
  font-size: 14px;
  color: #66646C;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links span { margin: 0 6px; }

/* ---------- Privacy policy and reservation terms ---------- */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 48px;
}

.legal-title {
  font-size: clamp(40px, 10vw, 72px);
  margin-bottom: 12px;
}

.legal-date {
  font-size: 14px;
  color: #66646C;
  margin-bottom: 32px;
}

.legal h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  margin: 40px 0 12px;
}

.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
}

.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; list-style: disc; }
.legal li { margin-bottom: 8px; }

.legal a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer {
  text-align: center;
  padding: 0 16px 64px;
}

.contact-privacy {
  margin-top: 24px;
  font-size: 14px;
  color: #66646C;
}

.contact-privacy a {
  color: var(--color-text);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .legal { padding: 32px 16px 64px; }
  .legal h2 { font-size: 24px; }
}
