/* The Hive Nextdoor: site styles */
@font-face { font-family: "Young Serif"; src: url("fonts/YoungSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-Variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  /* Brand colours: see brand guidelines */
  --honey: #F6B11C;
  --honey-deep: #E29B00;
  --comb: #FFE9A8;
  --navy: #1E2B5C;
  --navy-soft: #2E3D78;
  --lavender: #BBA7EE;
  --lavender-tint: #EEE8FC;
  --hedge: #2F6B4F;
  --postbox: #B8322A;
  --paper: #FFFDF6;
  --white: #FFFFFF;
  --line: rgba(30, 43, 92, .18);

  --serif: "Young Serif", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 28px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--navy); font: 400 1.125rem/1.6 var(--sans); overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.on-navy :focus-visible { outline-color: var(--honey); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: .7em 1.4em; border-radius: 999px; border: 2px solid var(--navy); font: 700 1.02rem/1.1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--paper); }
.btn-primary:hover { background: var(--navy-soft); border-color: var(--navy-soft); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--paper); }
.btn-honey { background: var(--honey); color: var(--navy); border-color: var(--honey); }
.btn-honey:hover { background: var(--comb); border-color: var(--comb); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--honey); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand-link { display: block; flex: none; }
.brand-link img { height: 48px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); }
.nav a:not(.btn) { font-weight: 600; text-decoration: none; font-size: 1rem; }
.nav a:not(.btn):hover { text-decoration: underline; }
.nav .btn { min-height: 44px; padding: .55em 1.15em; }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .brand-link img { height: 40px; }
  .site-header .wrap { height: 64px; }
}

/* Jar banner (arrived by scanning a QR) */
.jar-banner { background: var(--navy); color: var(--paper); }
.jar-banner .wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; font-size: 1rem; }
.jar-banner img { width: 44px; height: auto; flex: none; }
.jar-banner a { color: var(--honey); font-weight: 700; }

/* Hero */
.hero { background: var(--honey); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 56px); align-items: end; padding-top: clamp(40px, 7vw, 88px); }
.hero-copy { padding-bottom: clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.8rem, 5.4vw, 4.9rem); line-height: .98; }
.hero .lede { margin-top: 24px; font-size: clamp(1.14rem, 1.6vw, 1.32rem); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-art { align-self: end; margin-bottom: -2px; }
.hero-art svg { width: 100%; height: auto; }
.flight { stroke-dasharray: 7 7; }
@media (prefers-reduced-motion: no-preference) {
  .flight-mask { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s .5s cubic-bezier(.45,.05,.3,1) forwards; }
  .flight-bee { opacity: 0; animation: arrive .5s 2.8s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { from { opacity: 0; transform: translate(-6px, 6px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-art { max-width: 560px; justify-self: center; width: 100%; }
}
@media (max-width: 480px) { .hero .actions .btn { width: 100%; } }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 40rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.section-head p { margin-top: 16px; font-size: 1.2rem; }

/* How it works: an actual sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3.5vw, 48px); counter-reset: step; }
.steps li { counter-increment: step; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 56px; height: 62px; margin-bottom: 20px; background: var(--honey); color: var(--navy); font: 400 1.6rem/1 var(--serif); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.steps h3 { font-size: 1.6rem; margin-bottom: 10px; }
.steps p { max-width: 24em; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; } .steps li::before { grid-row: span 2; margin: 0; } }

/* Jar section */
.jar { background: var(--navy); color: var(--paper); overflow: hidden; }
.jar .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.jar h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.jar p { margin-top: 18px; font-size: 1.18rem; max-width: 30em; }
.jar ul { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.jar li { display: flex; gap: 12px; align-items: baseline; }
.jar li::before { content: ""; flex: none; width: 12px; height: 13px; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transform: translateY(1px); }
.label-card { position: relative; justify-self: center; width: min(100%, 560px); }
.label-card img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); transform: rotate(-2.5deg); }
.label-card figcaption { margin-top: 26px; font-size: .95rem; text-align: center; color: var(--comb); }
@media (max-width: 860px) { .jar .wrap { grid-template-columns: 1fr; } }

/* Two audiences */
.audiences .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.audience { border-radius: var(--r-lg); padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; }
.audience.consumer { background: var(--comb); }
.audience.beekeeper { background: var(--lavender-tint); }
.audience h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.audience > p { margin-top: 14px; font-size: 1.14rem; }
.audience ul { margin: 24px 0 32px; padding: 0 0 0 1.2em; display: grid; gap: 8px; }
.audience ul li::marker { color: var(--navy); }
.audience .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 820px) { .audiences .wrap { grid-template-columns: 1fr; } }

/* Register form */
.register { background: var(--paper); border-top: 1px solid var(--line); }
.register .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.register-intro { position: sticky; top: 108px; }
@media (max-width: 900px) { .register-intro { position: static; } }
.register-intro h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.register-intro p { margin-top: 16px; font-size: 1.16rem; }
.register-intro .small { font-size: .98rem; margin-top: 24px; }
.form-card { background: var(--white); border: 2px solid var(--navy); border-radius: var(--r-lg); padding: clamp(22px, 3.6vw, 44px); box-shadow: 8px 8px 0 var(--honey); }
@media (max-width: 900px) { .register .wrap { grid-template-columns: 1fr; } .form-card { box-shadow: 6px 6px 0 var(--honey); } }

.role-fieldset { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.role-fieldset legend { font-weight: 700; font-size: 1rem; padding: 0; margin-bottom: 8px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 999px; background: var(--lavender-tint); }
.role-switch input { position: absolute; opacity: 0; pointer-events: none; }
.role-switch label { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 12px; border-radius: 999px; text-align: center; font-weight: 700; cursor: pointer; line-height: 1.2; font-size: 1rem; }
.role-switch input:checked + label { background: var(--navy); color: var(--paper); }
.role-switch input:focus-visible + label { outline: 3px solid var(--navy); outline-offset: 2px; }

.field { display: grid; gap: 6px; margin-bottom: 18px; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field > label, .group-label { font-weight: 700; font-size: 1rem; }
.hint { font-size: .92rem; color: #4A5580; margin-top: -2px; }
input[type=text], input[type=email], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 400 1.05rem/1.3 var(--sans); color: var(--navy);
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-md); appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231E2B5C' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; padding-right: 40px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--comb); }
.field.invalid input, .field.invalid select { border-color: var(--postbox); }
.error { color: var(--postbox); font-size: .92rem; font-weight: 600; min-height: 0; }
.error:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 18px; }
.chips legend { font-weight: 700; font-size: 1rem; margin-bottom: 8px; padding: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .98rem; cursor: pointer; background: var(--paper); }
.chip input:checked + span { background: var(--honey); border-color: var(--honey); }
.chip input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }

.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; margin: 8px 0 22px; font-size: .98rem; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.err { color: var(--postbox); }
[hidden] { display: none !important; }
.submit { width: 100%; }
.submit[aria-busy=true] { opacity: .7; cursor: progress; }

.thanks { text-align: left; }
.thanks img { width: 84px; height: auto; margin-bottom: 18px; }
.thanks h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.thanks p { margin-top: 12px; font-size: 1.1rem; }
.thanks .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.demo-note { margin-top: 18px; font-size: .9rem; padding: 10px 14px; border-radius: var(--r-sm); background: var(--lavender-tint); }

/* FAQ */
.faq .wrap { max-width: 860px; }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font: 400 1.4rem/1.25 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: linear-gradient(var(--navy), var(--navy)) center/100% 3px no-repeat, linear-gradient(var(--navy), var(--navy)) center/3px 100% no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; max-width: 40em; }

/* Footer */
.site-footer { background: var(--navy); color: var(--paper); padding: 56px 0 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: flex-end; }
.site-footer img { height: 56px; width: auto; }
.site-footer p { font-size: .98rem; margin-top: 14px; max-width: 28em; color: #D9DDF0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .98rem; }
.site-footer a { color: var(--paper); }

/* Simple content pages */
.page { padding: clamp(48px, 8vw, 96px) 0; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 24px; }
.page h2 { font-size: 1.7rem; margin: 36px 0 10px; }
.page p, .page li { margin-bottom: 12px; }
.page .note { background: var(--comb); padding: 14px 18px; border-radius: var(--r-md); font-size: 1rem; }
.page .lost-bee { width: 96px; height: auto; margin-bottom: 20px; }
.page .page-actions { margin-top: 24px; }
