/* huddleparty.app: the app's own colours (apps/huddle/lib/theme/tokens.dart)
   and its body font, served from here, so the site loads nothing from
   anyone else. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper: #f5eee2;
  --card: #fffbf4;
  --line: #d9ccb8;
  --ink: #211b17;
  --muted: #5c5048;
  --accent: #c4401f;
  --notice: #fbe3d6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16110e;
    --card: #211b17;
    --line: #40362e;
    --ink: #f5eee2;
    --muted: #c2b5a6;
    --accent: #e2603d;
    --notice: #3a2219;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

main,
header,
footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
}

nav a {
  color: var(--muted);
}

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 2rem 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 750;
  margin: 2.25rem 0 0.5rem;
}

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

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.short {
  background: var(--notice);
  border-color: transparent;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

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

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

th {
  font-weight: 700;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

footer a {
  color: var(--muted);
}

/* The front page: wider than the policy pages, with the app's screens. */

.home main,
.home header,
.home footer {
  max-width: 68rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero .lede {
  max-width: 32rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 1rem;
}

.pills li {
  margin: 0;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.97rem;
}

.pills li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 0.4rem;
}

.soon {
  color: var(--muted);
  font-size: 0.97rem;
}

.hero-phones {
  position: relative;
  height: clamp(26rem, 48vw, 36rem);
}

.phone {
  position: absolute;
  height: 100%;
  width: auto;
  aspect-ratio: 390 / 844;
  border-radius: 2.2rem;
  border: 0.5rem solid #211b17;
  background: #211b17;
  box-shadow: 0 1.5rem 3rem rgb(33 27 23 / 22%);
}

.phone.front {
  right: 32%;
  top: 0;
  z-index: 1;
}

.phone.back {
  right: 0;
  top: 8%;
  height: 88%;
  transform: rotate(6deg);
  opacity: 0.97;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 3.5rem;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.4rem 1.4rem 0.6rem;
}

.feature h2 {
  margin: 0.9rem 0 0.4rem;
}

.feature p {
  color: var(--muted);
}

.icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  background: var(--notice);
  display: grid;
  place-items: center;
}

.icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon svg circle[r="1.2"] {
  fill: var(--accent);
  stroke: none;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.5rem;
  margin: 0 -0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.gallery figure {
  flex: 0 0 auto;
  width: clamp(12rem, 22vw, 15rem);
  margin: 0;
  scroll-snap-align: start;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
  border: 0.35rem solid #211b17;
  background: #211b17;
  box-shadow: 0 0.75rem 1.75rem rgb(33 27 23 / 16%);
}

.gallery figcaption {
  margin-top: 0.75rem;
  font-weight: 700;
  font-size: 0.97rem;
  text-align: center;
}

.gallery:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1rem;
}

.crews {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
}

.crews h2 {
  margin-top: 0;
}

@media (prefers-color-scheme: dark) {
  .phone,
  .gallery img {
    border-color: #40362e;
    box-shadow: none;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 2rem;
  }

  .hero-phones {
    height: 30rem;
    max-width: 22rem;
    width: 100%;
    margin: 0 auto;
  }

  .phone.front {
    right: auto;
    left: 0;
  }

  .features {
    grid-template-columns: 1fr;
  }
}
