:root {
  --orange-1: #f98916;
  --orange-2: #ff9425;
  --orange-3: #f37f07;
  --accent: #ff8b15;
  --accent-light: #ffcb96;
  --accent-dark: #e8720c;
  --ink: #1a1a1a;
  --ink-soft: #757575;
  --ink-faint: #9a9a9a;
  --field-bg: #f5f5f5;
  --white: #ffffff;

  --content-width: 1120px;
  --text-width: 1020px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 20px 44px rgba(120, 60, 0, 0.14);
  --shadow-modal: 0 32px 70px rgba(30, 12, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--orange-1);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  background: linear-gradient(
    180deg,
    var(--orange-1) 0%,
    var(--orange-2) 40%,
    var(--orange-1) 70%,
    var(--orange-3) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(20px, 4vh, 56px) 24px;
}

.hero__inner {
  width: 100%;
  max-width: var(--content-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: clamp(8px, 1.6vh, 18px);
}

.brand__mark {
  width: 39px;
  height: 45px;
}

.brand__name {
  color: var(--white);
  font-weight: 600;
  font-size: 36px;
  line-height: 65px;
}

.hero__title {
  color: var(--white);
  font-weight: 600;
  font-size: 75px;
  letter-spacing: -0.01em;
  line-height: 65px;
  margin: 0 0 clamp(14px, 2.4vh, 30px);
  text-wrap: balance;
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.7;
  max-width: var(--text-width);
  margin: 0 0 clamp(18px, 2.8vh, 38px);
}

/* ---------- Tab bar ---------- */

.tabbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 7px 40px;
  box-shadow: var(--shadow-card);
  margin: 0 auto clamp(16px, 2.2vh, 24px);
  width: 100%;
  max-width: var(--text-width);
  overflow-x: auto;
  position: relative;
}

.tabbar__indicator {
  position: absolute;
  top: 7px;
  left: 0;
  width: 134px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transform: translateX(0);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 0;
  pointer-events: none;
}

.tabbar__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 52px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--accent);
  position: relative;
  z-index: 1;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.tabbar__item::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tabbar__item--map::before {
  -webkit-mask-image: url("../assets/icons/map.png");
  mask-image: url("../assets/icons/map.png");
}

.tabbar__item--weather::before {
  -webkit-mask-image: url("../assets/icons/weather.png");
  mask-image: url("../assets/icons/weather.png");
}

.tabbar__item--community::before {
  -webkit-mask-image: url("../assets/icons/user-group.png");
  mask-image: url("../assets/icons/user-group.png");
}

.tabbar__item--checklist::before {
  -webkit-mask-image: url("../assets/icons/checklist.png");
  mask-image: url("../assets/icons/checklist.png");
}

.tabbar__item--progress::before {
  -webkit-mask-image: url("../assets/icons/library.png");
  mask-image: url("../assets/icons/library.png");
}

.tabbar__item--profile::before {
  -webkit-mask-image: url("../assets/icons/person-circle.png");
  mask-image: url("../assets/icons/person-circle.png");
}

.tabbar__item.is-active {
  color: var(--white);
  transition: color 0.15s ease 0.3s, background-color 0.2s ease;
}

.tabbar__item:hover:not(.is-active) {
  background: rgba(255, 139, 21, 0.08);
}

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

@media (prefers-reduced-motion: reduce) {
  .tabbar__indicator,
  .tabbar__item,
  .tabbar__item.is-active {
    transition: none;
  }
}

/* ---------- Feature card ---------- */

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(18px, 2.2vw, 30px) clamp(20px, 2.6vw, 36px);
  text-align: left;
  width: 100%;
  max-width: var(--text-width);
  margin-bottom: clamp(18px, 2.6vh, 32px);
}

.feature-card__title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
}

.feature-card__desc {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  margin: 0;
}

/* ---------- CTA ---------- */

.cta {
  border: none;
  background: var(--white);
  color: var(--accent);
  font-weight: 600;
  font-size: 24px;
  line-height: 65px;
  letter-spacing: 0;
  text-align: center;
  padding: 8px 46px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 50px rgba(120, 60, 0, 0.2);
}

.cta:active {
  transform: translateY(0);
}

#openSignup {
  font-weight: 600;
  transition: background-color 0.15s ease;
}

#openSignup:hover {
  background: #e0e0e0;
  transform: none;
  box-shadow: var(--shadow-card);
}

/* ---------- Footer ---------- */

.hero__footer {
  margin-top: clamp(12px, 2vh, 24px);
  display: flex;
  gap: 9px;
  font-size: 13px;
}

.hero__footer a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.hero__footer a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.hero__footer span {
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 760px;
  padding: 66px 80px 54px;
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #ececec;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.modal__close:hover {
  background: #e0e0e0;
}

.modal__close[hidden] {
  display: none;
}

.modal__close svg {
  width: 16px;
  height: 16px;
}

.modal__title {
  font-size: 40px;
  font-weight: 600;
  line-height: 50px;
  letter-spacing: 0;
  margin: 0 0 22px;
  text-align: center;
}

.text-accent {
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.modal__body {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 20px;
  line-height: 33px;
  letter-spacing: 0;
  text-align: center;
  margin: 0 0 34px;
}

/* Anti-bot honeypot: invisible to people, but bots that fill every input trip it. */
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  display: flex;
  align-items: center;
  background: var(--field-bg);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 26px;
  gap: 8px;
}

.field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  padding: 18px 0;
}

.field input::placeholder {
  color: var(--ink-faint);
}

.field input:focus {
  outline: none;
}

.field__submit {
  border: none;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 17px;
  padding: 18px 32px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.field__submit:hover {
  background: var(--accent-dark);
}

.field__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#panelSuccess .modal__body {
  color: #000;
}

.field.has-error {
  box-shadow: 0 0 0 1.5px #e0433a inset;
}

.field__error {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #e0433a;
  font-size: 14.5px;
  text-align: center;
  margin: 12px 0 0;
}

.field__error.is-visible {
  display: flex;
}

.field__error::before {
  content: "\24D8";
  font-weight: 700;
}

.modal__disclaimer {
  color: var(--ink-faint);
  font-size: 14px;
  line-height: 1.7;
  margin: 28px 0 0;
}

.success-icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 24px;
  background-color: var(--accent);
  -webkit-mask-image: url("../assets/icons/checkmark-circle.png");
  mask-image: url("../assets/icons/checkmark-circle.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.cta--modal {
  color: var(--white);
  background: var(--accent);
  font-weight: 500;
  margin: 10px auto 0;
  width: 213px;
  height: 64px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta--modal:hover {
  background: var(--accent-dark);
}

/* ---------- Responsive ---------- */

/* Below this width the fixed desktop line breaks in the intro no longer fit. */
/* Line breaks are viewport-specific: desktop breaks follow the wide layout,
   mobile breaks follow the client's phone mockup. */
.br--mobile {
  display: none;
}

@media (max-width: 820px) {
  .hero__subtitle {
    text-wrap: balance;
  }

  .br--desktop {
    display: none;
  }
}

@media (max-width: 640px) {
  /* Vertical gaps reach the Figma mobile values (440 x 956 frame) on tall
     screens and compress on shorter phones to limit scrolling. */
  .hero {
    min-height: 100svh;
    padding: clamp(28px, 6.3vh, 60px) 16px clamp(20px, 6vh, 58px);
  }

  /* Client spec (mobile): logo stacked above the name, logo 39 x 46,
     name 40px, tagline 22px. */
  .brand {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
  }

  .brand__mark {
    width: 39px;
    height: 46px;
  }

  .brand__name {
    font-size: 40px;
    line-height: 48px;
  }

  .hero__title {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: clamp(24px, 5.2vh, 50px);
  }

  .hero__subtitle {
    /* 16px on the 440px mockup frame; below that the size shrinks just
       enough that the client's fixed line breaks still fit on one line.
       The longest line measures 403px at 16px in Chrome; iOS renders Inter
       a touch wider, so the divisor (403 / 16 * 1.03 = 26) leaves 3% slack. */
    font-size: min(16px, calc((100vw - 32px) / 26));
    margin-bottom: clamp(24px, 4.7vh, 45px);
    /* Hard breaks control the lines here; balance/pretty would let Safari
       move words across them. */
    text-wrap: wrap;
  }

  .hero__sentence {
    display: block;
    text-wrap: wrap;
  }

  /* Blank line between the two intro sentences, per client mockup. */
  .hero__sentence + .hero__sentence {
    margin-top: 1em;
  }

  .br--mobile {
    display: inline;
  }

  .tabbar {
    padding: 6px 14px;
    gap: 4px;
    margin-bottom: 12px;
  }

  .feature-card {
    padding: 20px 18px;
    margin-bottom: clamp(28px, 6.3vh, 60px);
  }

  .feature-card__title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .hero__footer {
    margin-top: clamp(16px, 2.5vh, 24px);
  }

  .feature-card__desc {
    font-size: 16px;
  }

  .cta {
    font-size: 17px;
    line-height: 44px;
    padding: 8px 28px;
  }

  #openSignup {
    width: min(321px, 100%);
    height: 61px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
  }

  .modal-overlay {
    --modal-gutter: 16px;
    --modal-pad-x: 16px;
    /* Width of the longest accent line, in em, so it always fits on one line. */
    --accent-line-em: 13;
    padding: var(--modal-gutter);
  }

  .modal {
    padding: 64px var(--modal-pad-x) 28px;
  }

  .modal__close {
    top: 16px;
    left: 16px;
    width: 34px;
    height: 34px;
  }

  .modal__title {
    font-size: min(
      28px,
      calc((100vw - 2 * var(--modal-gutter) - 2 * var(--modal-pad-x)) / var(--accent-line-em))
    );
    line-height: 1.22;
    margin-bottom: 18px;
  }

  .modal__title .text-accent {
    white-space: nowrap;
  }

  .modal__body {
    font-size: 16px;
    line-height: 26px;
    margin-bottom: 26px;
  }

  #signupForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .field {
    display: contents;
  }

  .field input {
    width: 100%;
    background: var(--field-bg);
    border-radius: 20px;
    padding: 16px 20px;
  }

  .field.has-error input {
    box-shadow: 0 0 0 1.5px #e0433a inset;
  }

  .field__submit {
    width: 100%;
    border-radius: 14px;
    padding: 16px 24px;
  }

  .tabbar__item {
    width: 44px;
    height: 40px;
    flex-shrink: 1;
    min-width: 36px;
  }

  .tabbar__item::before {
    width: 26px;
    height: 26px;
  }

  .tabbar__indicator {
    top: 6px;
    width: 64px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  .tabbar {
    padding: 6px 10px;
    gap: 2px;
  }

  .tabbar__indicator {
    width: 56px;
  }

  #openSignup {
    font-size: 18px;
  }
}
