/*
 * The look of breez.ac: the app's "light air" tokens (docs/specs/06-design.md §2, §3), written once as CSS variables.
 * Light and dark follow the visitor's system setting. No web fonts (the system face is SF Pro on Apple devices), no images
 * from other sites, no script. Everything here is served from this site, so the page policy can say style-src 'self'.
 */

:root {
  color-scheme: light dark;
  --canvas: #f4f8fb;
  --surface: #ffffff;
  --sunken: #e9f0f6;
  --hairline: rgb(14 34 51 / 0.1);
  --line-strong: #738598;
  --ink: #0e2233;
  --ink-2: #455a6e;
  --ink-3: #4f6376;
  --accent: #0a63e8;
  --accent-hover: #0856cc;
  --accent-soft: #e5eefe;
  --on-accent: #ffffff;
  --shadow: 0 16px 48px rgb(14 34 51 / 0.08);
  /* Line length: about 75 characters of 18 px text, and of 16 px text, however wide the screen is. */
  --measure: 36rem;
  --measure-small: 32rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0a1117;
    --surface: #131c25;
    --sunken: #1a2733;
    --hairline: rgb(234 242 248 / 0.12);
    --line-strong: #60758a;
    --ink: #eaf2f8;
    --ink-2: #b3c3d1;
    --ink-3: #8497a9;
    --accent: #3b8bff;
    --accent-hover: #6aa5ff;
    --accent-soft: #10213f;
    --on-accent: #061426;
    --shadow: 0 16px 48px rgb(0 0 0 / 0.5);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font:
    400 1.125rem/1.6 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  /* A long string (an email address at a large text size) breaks inside its box instead of widening the page. */
  overflow-wrap: break-word;
}

/* Large screens: the whole layout is in rem, so a larger root size scales the column, the type and the pictures together. */
@media (min-width: 100rem) {
  html {
    font-size: 112.5%;
  }
}

@media (min-width: 137.5rem) {
  html {
    font-size: 125%;
  }
}

/* Expo Router wraps the page in one plain div; let it carry the page height so the footer sits at the bottom. */
#root,
#root > div {
  min-height: inherit;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: max(1.5rem, env(safe-area-inset-left));
}

.wrap.wide {
  max-width: 62rem;
}

main {
  flex: 1 0 auto;
  padding-block: 1rem 4rem;
}

/* Header */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
  display: block;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-inline: -0.75rem;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.site-header nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.site-header nav a[aria-current="page"] {
  background: var(--sunken);
  color: var(--ink);
  font-weight: 600;
}

/* From 768 px (48rem) all five items fit one row beside the brand (brand 104 px + nav 550 px + the gap + the 40 px side padding
   needs about 760 px). Below it (up to 767.84 px: the query is max-width 47.99rem, so exactly 768 px is not a phone), four fit one row
   from 320 px at 16 px: "Rental Hosts" is "Hosts" and "Privacy policy" is "Privacy" in the header, Terms is left out of it (it is in
   the footer), and the padding is tighter. */
.site-header .brief {
  display: none;
}

@media (max-width: 47.99rem) {
  .site-header nav {
    gap: 0.25rem 0.125rem;
    margin-inline: -0.5rem;
  }

  .site-header nav a {
    padding-inline: 0.5rem;
  }

  .site-header .full {
    display: none;
  }

  .site-header .brief {
    display: inline;
  }

  .site-header nav .wide-only {
    display: none;
  }
}

/* At 320 px the four items need the whole row, so the side padding and the item padding give a little (44 px wide stays). */
@media (max-width: 22.5rem) {
  .wrap {
    padding-inline: max(1rem, env(safe-area-inset-left));
  }

  .site-header nav {
    margin-inline: -0.25rem;
  }

  .site-header nav a {
    padding-inline: 0.25rem;
  }
}

/* Type */

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.125rem, 1.2rem + 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h3 {
  margin-top: 1.75rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

/* A sub-heading straight under a heading sits the same 16 px under it as a paragraph does. */
h2 + h3 {
  margin-top: 1rem;
}

p,
ul,
ol,
dl {
  margin: 1rem 0 0;
}

li + li {
  margin-top: 0.5rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

.lead {
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 1.3125rem;
  line-height: 1.5;
}

.lead + .lead {
  margin-top: 0.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta {
  max-width: var(--measure-small);
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 1rem;
}

a {
  overflow-wrap: anywhere;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.375rem;
}

strong {
  font-weight: 600;
}

/* Running text keeps a readable line however wide its box is (panes, answers and lists are full width; the text in them is not). */
main p,
main li,
main dd {
  max-width: var(--measure);
}

/* Panes (06 §5: one layer, a surface and a hairline, no shadow) */

.pane {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 1.75rem;
  background: var(--surface);
}

.pane > :first-child {
  margin-top: 0;
}

/* A box never ends in its last child's margin: the padding is the only space under the content. */
.pane > :last-child {
  margin-bottom: 0;
}

.pane h2,
.pane h3 {
  margin-top: 0;
}

/* On the wide pages, running text keeps the reading column's width and sits under the headline's left edge. */
.column {
  max-width: 44rem;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.grid .pane {
  margin-top: 0;
}

/* Three across from 56 rem. A paragraph always sits the same distance under its own title, however many lines the title
   takes; the cards share one height. Below that the cards stack, so there is never an orphan in a half-empty row. */
@media (min-width: 56rem) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid p {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn.quiet {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn.quiet:hover {
  background: var(--sunken);
}

/* The "Get the App" window (components/get-app.tsx): no script, so :target shows it. It is fixed over the page with a dimmed
   backdrop, scrolls inside itself when the screen is short, and the page behind it stops scrolling while it is open. */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal:target {
  display: flex;
}

html:has(.modal:target) {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(8 18 28 / 0.62);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 1.5rem;
  background: var(--surface);
}

.modal-card h2 {
  margin: 0;
  padding-right: 5rem;
  font-size: 1.75rem;
}

.modal-card p {
  margin: 0.5rem 0 0;
  color: var(--ink-2);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.modal-close:hover {
  background: var(--sunken);
}

.stores {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
}

/* Both badges are 3rem tall (Apple's minimum on screen is 40 px). The padding is the clear space both stores ask for, about a
   quarter of the badge's height, and it keeps the tap target well over 44 px. */
.store-badge {
  display: inline-flex;
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.store-badge img {
  display: block;
  width: auto;
  height: 3rem;
}

.store-badge:hover {
  background: var(--sunken);
}

.store-note {
  font-size: 1rem;
}

.store-legal {
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.store-soon {
  margin-top: 0.25rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.btn {
  max-width: 100%;
}

/* A short screen (a phone on its side): less padding, the window a little wider and the two stores side by side, so the whole window
   and its Close button fit without scrolling. */
@media (max-height: 30rem) {
  .modal {
    padding: 0.5rem;
  }

  .modal-card {
    padding: 1rem 1.25rem 1.25rem;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

@media (max-height: 30rem) and (min-width: 36rem) {
  .modal-card {
    max-width: 40rem;
  }

  .stores {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.75rem;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Home */

.hero {
  padding-block: 1.5rem 0;
}

/* Keep running text to a readable line length on the wide home page. */
.hero > :not(.hero-art):not(.meta),
.measure {
  max-width: var(--measure);
}

.hero picture,
.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-art {
  margin: 2rem 0 0;
}

/* The picture and the player share one shape and one 782:440 box, so opening the video replaces the picture without a jump. */
.video-poster,
.video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 782 / 440;
  overflow: hidden;
  border: 0;
  border-radius: 1.5rem;
  background: var(--sunken);
}

@media (min-width: 600px) {
  .video-poster,
  .video-frame {
    border-radius: 2.25rem;
  }
}

.hero-art img {
  aspect-ratio: 782 / 440;
  object-fit: cover;
}

/*
 * Click to play with no script: the picture is the <summary> of a <details>, and the player (a lazy iframe) is its content, so
 * Stream is not asked for anything until the visitor opens it. These rules undo the question-and-answer look that details and
 * summary have elsewhere on the site. Open, the summary is hidden and the player takes the picture's place.
 */
.video {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.video summary {
  display: block;
  min-height: 0;
  padding: 0;
  margin: 0;
  border-radius: 1.5rem;
  color: var(--accent);
}

.video summary::after {
  content: none;
}

.video summary:hover {
  color: var(--accent-hover);
}

.video summary:focus-visible {
  outline-offset: 4px;
}

.video[open] > summary {
  display: none;
}

.video[open] > .video-frame {
  margin-bottom: 0;
}

.video-poster {
  position: relative;
}

.play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5rem;
  height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.35);
}

/* The triangle, drawn with a clip path and nudged right so it looks centred. */
.play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.75rem;
  height: 2rem;
  margin: -1rem 0 0 -0.75rem;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.video summary:hover .play,
.video summary:focus-visible .play {
  background: var(--accent-hover);
}

@media (min-width: 600px) {
  .play {
    width: 6rem;
    height: 6rem;
    margin: -3rem 0 0 -3rem;
  }

  .play::before {
    width: 2.125rem;
    height: 2.5rem;
    margin: -1.25rem 0 0 -0.875rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .play {
    transition: transform 0.2s ease;
  }

  .video summary:hover .play,
  .video summary:focus-visible .play {
    transform: scale(1.08);
  }

  /* A soft ring that breathes out three times, then stops. */
  .play::after {
    content: "";
    position: absolute;
    inset: -3px;
    border: 3px solid #fff;
    border-radius: 50%;
    opacity: 0;
    animation: play-ring 2.4s ease-out 0.8s 3;
  }
}

@keyframes play-ring {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

/* The closing card of the home page sits a section's width below the text above it. */
.pane.closing {
  margin-top: 3rem;
}

/* The contact form on the support page: labels above fields, fields as wide as the pane, 44 px or taller, in the site's colours. */
.contact,
#quick-answers {
  scroll-margin-top: 1.5rem;
}

.form {
  display: grid;
  gap: 1.125rem;
  margin-top: 1rem;
}

.field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
}

.field label {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.875rem;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

/* The honeypot: out of sight and out of reach for people, still in the form for bots. */
.field.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form .actions {
  margin-top: 0;
}

button.btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* Reading pages */

.prose address {
  margin-top: 1rem;
  font-style: normal;
}

.table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 1.0625rem;
}

.table th,
.table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 600;
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* On a phone the three columns would each be about 100 px wide, so each row becomes a small card: the column name above
   each value (from the data-label on the cell) and the header row kept for screen readers only. The table, row and cell roles are
   written on the elements (role="table" and so on), because display: block would otherwise drop the table semantics in some
   browsers. */
@media (max-width: 39.99rem) {
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
  }

  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  /* Every card has a rule above and below it (the first one included), the same space inside, a small gap between a name
     and its value and a larger one between one name-and-value pair and the next. */
  .table tr {
    padding-block: 1rem;
    border-bottom: 1px solid var(--hairline);
  }

  .table tbody tr:first-child {
    border-top: 1px solid var(--hairline);
  }

  .table td {
    padding: 0;
    border-bottom: 0;
  }

  .table td + td {
    margin-top: 0.75rem;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.125rem;
    color: var(--ink-2);
    font-size: 1rem;
    font-weight: 600;
  }
}

details {
  margin-top: 0.75rem;
  padding: 0.25rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--line-strong) 45%, transparent);
  border-radius: 1.125rem;
  background: var(--surface);
}

h2 + details {
  margin-top: 1rem;
}

details:hover,
details[open] {
  border-color: var(--line-strong);
}

/* The disclosure marker is a chevron on the right, so a question that wraps keeps its second line under its first. */
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding-block: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.25rem;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: translateY(-0.125rem) rotate(45deg);
}

details[open] > summary::after {
  transform: translateY(0.125rem) rotate(225deg);
}

summary:hover {
  color: var(--accent);
}

details[open] summary {
  margin-bottom: -0.25rem;
}

/* Whatever an answer ends with (a paragraph, a list), it gets the same space under it. */
details[open] > :last-child:not(summary) {
  margin-bottom: 1rem;
}

.toc {
  margin-top: 1.5rem;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li + li {
  margin-top: 0;
}

/* One item never splits across the two columns. */
.toc li {
  break-inside: avoid;
}

@media (min-width: 40rem) {
  .toc ul {
    columns: 2;
    column-gap: 2rem;
  }
}

/* The brand lists flow into two columns on a phone and three on a wider screen; a name never splits across columns. */
.brands {
  columns: 2;
  column-gap: 2rem;
}

.brands li {
  break-inside: avoid;
}

@media (min-width: 40rem) {
  .brands {
    columns: 3;
  }
}

/* Every link has the same padding above and below its text, so one-line and two-line items keep one rhythm; the minimum
   height only keeps the tap target at 44 px. */
.toc a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.5rem;
}

.linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-top: 1rem;
}

.linkrow a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.nb {
  white-space: nowrap;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  color: var(--ink-2);
  font-size: 1rem;
}

.site-footer .wrap {
  padding-block: 2rem 3rem;
}

.site-footer p {
  max-width: var(--measure-small);
  margin-top: 0.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-bottom: 1rem;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.site-footer nav a:hover {
  color: var(--ink);
}

/* Links inside a sentence keep their place in the line; the padding only makes the tap area taller. */
.site-footer p a {
  padding-block: 0.8rem;
}

.small {
  color: var(--ink-3);
  font-size: 1rem;
}

@media (min-width: 720px) {
  .wrap {
    padding-inline: 2.5rem;
  }

  main {
    padding-block: 2rem 5rem;
  }
}

@media (prefers-contrast: more) {
  .pane,
  details {
    border-color: var(--line-strong);
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header nav,
  .skip,
  .actions,
  .modal {
    display: none !important;
  }

  a {
    color: inherit;
  }
}
