/* Layout for the header menu, the sections below the housing street, and the legal pages. */

/* ------------------------------------------------------------------- header */
.site-head .wrap { justify-content: flex-start; }
.wordmark { margin-right: auto; }
.menu-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); color: var(--navy); cursor: pointer;
}
.head-cta { flex: none; }
@media (max-width: 959px) {
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 100%; padding: 10px 16px 16px;
    background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-card);
  }
  .site-nav.is-open .link { display: flex; min-height: 48px; }
  .menu-toggle:not([hidden]) { display: inline-flex; }
}

/* ----------------------------------------------------------------- sections */
.section { padding-block: clamp(52px, 7vw, 96px); }
.section.alt { background: var(--surface); }
.sec-head { max-width: 62ch; margin-bottom: 32px; }
.sec-head h2, .free h2 { margin-top: 8px; font-size: clamp(28px, 4vw, 42px); }
.sec-sub { margin-top: 10px; color: var(--muted); }
.btn-chili { background: var(--chili); color: #fff; }

/* ---------------------------------------------------------------------- why */
.why-scene {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between;
  min-height: 290px; overflow: hidden; padding: 0 clamp(8px, 6vw, 90px) 14px;
  border-radius: var(--r-lg); background: linear-gradient(var(--navy) 0 82%, #171E52 82%);
}
.why-buyer, .why-seller { position: relative; z-index: 1; display: grid; justify-items: center; width: clamp(112px, 20vw, 160px); }
.why-buyer .fudi, .why-seller .fudi { width: 100%; }
.why-seller { margin-bottom: 18px; }
.why-fence { position: absolute; z-index: 2; right: 0; bottom: 0; width: clamp(150px, 32vw, 340px); height: 62px; }
.bubble {
  justify-self: center; margin-bottom: -8px; padding: 8px 14px; border-radius: var(--r-card);
  background: #fff; color: var(--navy-deep); font: 600 clamp(13px, 1.6vw, 16px)/1.3 var(--font-display); white-space: nowrap;
}
.why-seller .bubble { background: var(--mango); }

.cards3 { display: grid; gap: 14px; margin-top: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.card h3 { margin-bottom: 8px; font-size: 19px; }
.card p { color: var(--muted); font-size: 15px; }
.num {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px; border-radius: 10px;
  background: var(--navy-soft); color: var(--navy); font: 600 16px/1 var(--font-display);
}
@media (max-width: 760px) { .cards3 { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------- apps */
.apps { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app { position: relative; display: flex; flex-direction: column; padding-top: 118px; } /* room for the whole face */
.peek { position: absolute; top: 0; right: 24px; width: 124px; }
.peek .fudi { width: 100%; }
.app-card {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 24px; border: 2px solid var(--navy); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card);
}
.app.seller .app-card { border-color: var(--chili); }
.app-card h3 { font-size: 26px; }
.app-card > p { color: var(--muted); }
.app-card .btn { margin-top: auto; }
.pill { padding: 4px 12px; border-radius: var(--r-pill); background: var(--navy-soft); color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.seller .pill { background: #FBE9E9; color: var(--chili-dark); }
.ticks { display: grid; gap: 10px; margin: 6px 0 12px; padding: 0; list-style: none; font-size: 15px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 11px;
  border: solid var(--leaf); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
@media (max-width: 820px) { .apps { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------- categories */
.cats { position: relative; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); cursor: pointer; }
.cat-art { display: flex; align-items: center; height: 150px; padding-left: 10%; background: var(--tone); }
.cat-art svg { width: min(62%, 120px); height: auto; }
.cat h3 { padding: 12px 16px 0; font-size: 18px; }
.cat p { padding: 0 16px 14px; color: var(--muted); font-size: 13px; }
.hopper { position: absolute; left: 0; top: 0; width: clamp(54px, 7vw, 80px); pointer-events: none; }
.hopper .fudi { width: 100%; }
@media (max-width: 760px) { .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat-art { height: 112px; } }

/* --------------------------------------------------------------------- free */
.free {
  display: grid; gap: 28px 40px; align-items: center; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  padding: clamp(24px, 4vw, 52px); border-radius: var(--r-lg); background: var(--navy); color: #fff;
}
.free h2 { margin: 0; color: #fff; }
.free p { margin: 12px 0 20px; color: #D5D9F2; }
.free .ticks { margin: 0; }
.free .ticks li::before { border-color: var(--mango); }
.free-mascot { width: clamp(120px, 15vw, 180px); }
.free-mascot .fudi { width: 100%; }
@media (max-width: 900px) { .free { grid-template-columns: minmax(0, 1fr); } .free-mascot { justify-self: center; } }

/* ---------------------------------------------------------------------- faq */
.faq-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) 220px; align-items: start; }
.faq { display: grid; gap: 10px; }
.faq details { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 12px 18px;
  color: var(--navy-deep); font: 600 17px/1.35 var(--font-display); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--navy); font-size: 24px; font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--navy-soft); }
.faq details p { max-width: 68ch; padding: 0 18px 18px; color: var(--muted); font-size: 15px; }
.faq-mascot { position: sticky; top: calc(var(--head-h) + 40px); }
.faq-mascot .fudi { width: 100%; }
@media (max-width: 760px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-mascot { position: static; order: -1; width: 120px; justify-self: end; margin-block: -40px -24px; }
}

/* ------------------------------------------------------------------ sign-up */
.signup { padding-block: clamp(52px, 7vw, 96px); background: var(--navy); color: #fff; }
.signup .sec-head { margin-inline: auto; text-align: center; }
.signup h2 { color: #fff; }
.signup .sec-sub { color: #D5D9F2; }
.signup-row { display: grid; gap: 16px 36px; align-items: end; justify-content: center; grid-template-columns: 190px minmax(0, 460px) 190px; }
.side-mascot .fudi { width: 100%; }
.form { display: grid; gap: 12px; padding: 24px; border-radius: var(--r-lg); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lift); }
.form fieldset { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; border: 0; }
.form legend, .field { padding: 0; font-weight: 700; font-size: 15px; }
.form legend { margin-bottom: 8px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; place-items: center; min-height: 48px; border: 2px solid var(--line); border-radius: var(--r-card); font-weight: 700; cursor: pointer; }
.choice input:checked + span { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); }
.choice input[value="penjual"]:checked + span { border-color: var(--chili); background: #FBE9E9; color: var(--chili-dark); }
.choice input:focus-visible + span { outline: 3px solid var(--mango); outline-offset: 2px; }
.form input[type="text"] { width: 100%; min-height: 50px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; font: 16px var(--font-body); color: var(--ink); }
.form input[aria-invalid="true"] { border-color: var(--chili); }
.error { color: var(--chili-dark); font-size: 14px; font-weight: 700; }
.form .btn:disabled { opacity: .55; cursor: default; }
.note, .preview-note, .status { font-size: 13px; color: var(--muted); }
.status { color: var(--ink); font-weight: 600; }
.status:empty { display: none; }
.preview-note { padding: 8px 12px; border-radius: 10px; background: var(--mango-soft); color: #8A3F08; }
.clear { justify-self: start; padding: 6px 0; border: 0; background: none; color: var(--navy); font: 600 13px var(--font-body); text-decoration: underline; cursor: pointer; }
@media (max-width: 960px) {
  .signup-row { grid-template-columns: repeat(2, minmax(0, 150px)); }
  .form { grid-column: 1 / -1; grid-row: 2; width: min(460px, calc(100vw - 32px)); justify-self: center; }
  .side-mascot { grid-row: 1; }
}

/* ------------------------------------------------------------------- footer */
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-foot a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- legal pages */
.legal { width: min(720px, 100% - 32px); margin-inline: auto; padding-block: 32px 64px; }
.legal h1 { font-size: clamp(30px, 5vw, 40px); }
.legal h2 { margin: 28px 0 8px; font-size: 21px; }
.legal p, .legal ul, .legal ol { margin: 10px 0 0; }
.legal li { margin-top: 6px; }
