@font-face {
  font-family: "Salsa";
  src: url("./Salsa-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("./OpenSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("./OpenSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("./OpenSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #93c524;
  --primary-dark: #6d911e;
  --sky: #28a8e3;
  --sky-dark: #1b85b8;
  --sunny: #ffd823;
  --orange: #ff8a3d;
  --paper: #fffdf7;
  --ink: #2c2a28;
  --muted: #7a7a7a;
  --line: #eceae4;
  --footer: #704f32;
  --surface: #ffffff;
  --max: 1100px;
  --nav-h: 70px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--sky-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover { color: var(--primary-dark); }

h1, h2, h3, .brand {
  font-family: "Salsa", Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}

.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

/* —— Nav (SmartGoldCalc-style: links + store buttons) —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 253, 247, 0.9);
  border-bottom: 1px solid var(--line);
}

.site-nav__inner {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.brand-link img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-link span {
  font-family: "Salsa", Georgia, serif;
  font-size: 1.3rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(40, 168, 227, 0.12);
  color: var(--sky-dark);
}

.nav-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--primary);
  color: #1f2a0a !important;
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff !important;
}

.btn--sky {
  background: var(--sky-dark);
  color: #fff !important;
  border-color: var(--sky-dark);
}

.btn--sky:hover {
  background: var(--sky);
  border-color: var(--sky);
  color: #fff !important;
}

.btn--ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--sky);
  color: var(--sky-dark) !important;
}

.btn--lg {
  padding: 14px 22px;
  font-size: 1rem;
  border-radius: 16px;
}

.btn.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 216, 35, 0.4), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(40, 168, 227, 0.22), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 80%, rgba(147, 197, 36, 0.25), transparent 50%),
    linear-gradient(180deg, #c9eefb 0%, #e8f7fd 42%, #fffdf7 100%);
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.8) 0 26px, transparent 28px),
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.55) 0 48px, transparent 50px),
    radial-gradient(circle at 78% 20%, rgba(255,255,255,.7) 0 32px, transparent 34px);
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-18px); }
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__inner { position: relative; }

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
  animation: rise 0.7s ease both;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.pill:hover { color: var(--sky-dark); }

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  animation: rise 0.8s ease 0.05s both;
}

.hero__lead {
  margin: 0 auto 28px;
  max-width: 36ch;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink);
  animation: rise 0.8s ease 0.1s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  animation: rise 0.8s ease 0.15s both;
}

.hero__visual {
  width: min(100%, 420px);
  margin: 0 auto;
  animation: float 3.2s ease-in-out infinite alternate, rise 0.9s ease 0.2s both;
}

.hero__visual img {
  width: 100%;
  filter: drop-shadow(0 24px 36px rgba(27, 133, 184, 0.28));
}

.section-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-dark);
}

.section {
  padding: 72px 0;
}

.section--sky {
  background: linear-gradient(180deg, #e0f4fd 0%, #fffdf7 100%);
}

.section--leaf {
  background: linear-gradient(180deg, #eaf7e0 0%, #fffdf7 100%);
}

.section--sunny {
  background: linear-gradient(180deg, #fff6c7 0%, #fffdf7 100%);
}

.section__head {
  text-align: center;
  margin-bottom: 40px;
}

.section__head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
}

.section__head p {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.feature {
  padding: 8px 4px;
}

.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 12px;
  background: #e0f4fd;
}

.feature:nth-child(2) .feature__icon { background: #eaf7e0; }
.feature:nth-child(3) .feature__icon { background: #fff6c7; }
.feature:nth-child(4) .feature__icon { background: #ffebdd; }
.feature:nth-child(5) .feature__icon { background: #efe8fb; }
.feature:nth-child(6) .feature__icon { background: #ffe3e0; }

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 8px 4px 8px 0;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--primary);
  color: #1f2a0a;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.cta-band {
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
}

.cta-band p {
  margin: 0 auto 24px;
  max-width: 42ch;
  color: var(--muted);
}

.cta-band .hero__cta {
  margin-bottom: 0;
}

/* —— Legal pages —— */
.page-hero {
  padding: 48px 0 32px;
  background: linear-gradient(165deg, #b8e8fb 0%, #e0f4fd 50%, #fffdf7 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero .wrap { max-width: 760px; }

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.page-hero p {
  margin: 0;
  color: var(--muted);
}

.content {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  padding: 40px 0 72px;
}

.content h2 {
  margin: 28px 0 10px;
  font-size: 1.4rem;
}

.content h2:first-child { margin-top: 0; }

.content ul { padding-left: 1.2rem; }
.content li { margin-bottom: 6px; }

.content .meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.howto {
  counter-reset: howto;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.howto li {
  position: relative;
  padding: 14px 14px 14px 56px;
  margin-bottom: 10px;
  border-left: 3px solid var(--primary);
  background: rgba(147, 197, 36, 0.08);
  border-radius: 0 14px 14px 0;
}

.howto li::before {
  counter-increment: howto;
  content: counter(howto);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #1f2a0a;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

/* —— Footer —— */
.site-footer {
  background: var(--footer);
  color: #f8efe4;
  padding: 40px 0 28px;
}

.site-footer a { color: #fff6c7; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
}

.site-footer h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: #fff;
}

.site-footer p,
.site-footer li {
  margin: 0 0 8px;
  font-size: 0.94rem;
  color: rgba(248, 239, 228, 0.88);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  color: rgba(248, 239, 228, 0.7);
}

@media (max-width: 900px) {
  .grid-3,
  .grid-2,
  .steps,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  /* Keep logo clean — store CTAs live in the hero on phones */
  .nav-store {
    display: none;
  }

  .nav-links > a:not(.btn) {
    display: none;
  }

  .nav-links > a[href="/support/"],
  .nav-links > a[href="../support/"],
  .nav-links > a[href="/support"] {
    display: inline-flex;
  }

  .brand-link span {
    font-size: 1.15rem;
  }

  .hero { padding-top: 28px; }
}

@media (max-width: 420px) {
  .brand-link span {
    max-width: 11ch;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
