:root {
  --tangerine: #fbbd04;
  --ink: #111111;
  --blaze: #e24933;
  --snow: #f4f6f8;
  --white: #ffffff;
  --steel: #d8d8d3;
  --raw-cyan: #00e0ff;
  
  --border-thick: 3px solid var(--ink);
  --shadow-hard: 6px 6px 0px var(--ink);
  --shadow-hard-hover: 2px 2px 0px var(--ink);
  --shadow-soft: 4px 4px 0px rgba(17, 17, 17, 0.16);
  --radius: 8px;
  --radius-lg: 16px;
  
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--snow);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
h3 { font-size: 1.5rem; margin-bottom: 12px; }
p { font-size: 1.125rem; margin-bottom: 24px; opacity: 0.9; }

/* Neubrutalist Components */
.neu-card {
  background: var(--white);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 32px;
}

.neu-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--tangerine);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  text-decoration: none;
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 12px 24px;
  transition: all 0.1s ease;
  cursor: pointer;
}

.neu-btn:hover {
  transform: translate(4px, 4px);
  box-shadow: var(--shadow-hard-hover);
}

/* Header */
.header {
  padding: 24px 0;
  border-bottom: var(--border-thick);
  background: var(--tangerine);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.logo-box {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid var(--ink);
}

.badge {
  background: var(--ink);
  color: var(--tangerine);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  vertical-align: middle;
}

.nav a {
  margin-left: 24px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.nav a:hover { text-decoration: underline; }

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 80px 24px;
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    align-items: flex-start;
    padding: 88px 24px 96px;
  }
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 4.4vw, 3.5rem);
  max-width: 640px;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 500px;
}

.pricing-badge {
  display: inline-block;
  background: var(--blaze);
  color: var(--white);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 16px 24px;
  margin-bottom: 24px;
  transform: rotate(-1deg);
}
.pricing-highlight {
  display: block;
  font-weight: 800;
  font-size: 1.25rem;
}
.pricing-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.pricing-sub {
  display: block;
  font-size: 1rem;
  opacity: 0.9;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cta-group-secondary {
  margin-top: 28px;
}

.store-btn {
  min-height: 64px;
  min-width: 214px;
}

.store-btn .btn-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
}
.store-btn .btn-main {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 2px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

/* Device Frames */
.device-frame {
  padding: 12px;
  box-shadow: 16px 16px 0px rgba(17,17,17,0.1);
  position: relative;
  border: 4px solid var(--ink);
}

.device-frame picture {
  display: block;
  width: 100%;
}

.device-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  border: 2px solid var(--ink);
  position: relative;
  z-index: 1;
}

.device-frame.ios {
  background: var(--snow);
  border-radius: 48px;
}
.device-frame.ios::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: var(--ink);
  border-radius: 13px;
  z-index: 10;
}

.device-frame.android {
  background: var(--steel);
  border-radius: 24px;
}
.device-frame.android::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
  z-index: 10;
}

.iphone-frame {
  max-width: 320px;
  transform: rotate(2deg);
  width: min(100%, 320px);
}

.gallery-frame {
  max-width: 260px;
  flex: 0 0 auto;
  width: min(100%, 260px);
}

.tilt-right {
  transform: rotate(2deg);
}

.tilt-left {
  transform: rotate(-3deg);
}

.tilt-slight {
  transform: rotate(1deg);
}

.tilt-hard {
  transform: rotate(4deg);
}

.ipad-frame {
  max-width: 600px;
  transform: rotate(-1deg);
  width: min(100%, 600px);
}

/* Imperial Math */
.imperial-math {
  display: grid;
  gap: 40px;
  padding: 40px 24px 96px;
}

.section-kicker {
  color: var(--blaze);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.imperial-heading {
  max-width: 900px;
}

.calc-proof {
  background: var(--ink);
  border: var(--border-thick);
  color: var(--snow);
  margin-top: 10px;
  max-width: 560px;
  padding: 24px;
}

.calc-proof-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-proof-input {
  color: var(--tangerine);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 600;
}

.calc-proof-result {
  border-top: 3px solid var(--snow);
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  margin-top: 18px;
  padding-top: 16px;
}

.calc-proof-result strong {
  color: var(--raw-cyan);
}

.imperial-note {
  font-weight: 800;
  margin-bottom: 0;
  margin-top: 18px;
}

.calculator-comparison {
  display: grid;
  gap: 24px;
}

.comparison-panel {
  min-width: 0;
}

.panel-kicker {
  color: var(--blaze);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.decimal-panel {
  background: var(--white);
}

.decimal-display {
  background: var(--ink);
  border: var(--border-thick);
  color: var(--snow);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.35rem);
  gap: 10px;
  margin-bottom: 22px;
  padding: 22px;
}

.decimal-display strong {
  color: var(--blaze);
}

.pain-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin-bottom: 22px;
}

.pain-list li {
  align-items: flex-start;
  display: flex;
  font-size: 1.05rem;
  font-weight: 700;
  gap: 10px;
}

.pain-list li::before {
  background: var(--blaze);
  border: 2px solid var(--ink);
  content: "";
  display: inline-block;
  flex: 0 0 12px;
  height: 12px;
  margin-top: 7px;
  transform: rotate(45deg);
  width: 12px;
}

.panel-warning {
  background: var(--blaze);
  border: var(--border-thick);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 0;
  padding: 12px 14px;
}

.plumb-panel {
  background: var(--tangerine);
  display: grid;
  gap: 24px;
  overflow: hidden;
}

.plumb-panel .panel-kicker {
  color: var(--ink);
}

.imperial-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.imperial-frame {
  transform: rotate(-2deg);
  width: min(86vw, 260px);
}

.calc-callout {
  background: var(--tangerine);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-hover);
  color: var(--ink);
  font-weight: 800;
  max-width: 180px;
  padding: 10px 12px;
  position: absolute;
  text-align: center;
}

.callout-top {
  right: 0;
  top: 13%;
  transform: rotate(3deg);
}

.callout-bottom {
  bottom: 11%;
  left: 0;
  transform: rotate(-3deg);
}

.imperial-grid {
  display: grid;
  gap: 20px;
}

.imperial-card {
  background: var(--white);
  padding: 24px;
}

.imperial-card .material-symbols-outlined {
  color: var(--blaze);
  display: block;
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.imperial-card p {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .calculator-comparison {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .plumb-panel {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .imperial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .imperial-math {
    padding-bottom: 120px;
    padding-top: 56px;
  }

  .imperial-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .imperial-card {
    min-height: 260px;
  }
}

/* Gallery */
.gallery {
  padding: 80px 0 72px;
  text-align: center;
}

.gallery h2 {
  color: var(--ink);
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.gallery-scroll {
  display: flex;
  gap: 28px;
  margin: 0 -24px;
  overflow-x: auto;
  padding: 8px 24px 32px;
  scroll-padding: 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-scroll:focus-visible,
.horizontal-scroll:focus-visible {
  outline: 4px solid var(--blaze);
  outline-offset: 4px;
}

.gallery-item {
  align-items: center;
  display: flex;
  flex: 0 0 min(82vw, 320px);
  flex-direction: column;
  max-width: 320px;
  scroll-snap-align: center;
  text-align: center;
}

.gallery-copy {
  margin-top: 24px;
}

.gallery-copy h3 {
  color: var(--ink);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.gallery-copy p {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0;
  opacity: 0.8;
}

@media (min-width: 620px) {
  .gallery-item {
    flex-basis: min(44vw, 300px);
  }
}

@media (min-width: 1100px) {
  .gallery-scroll {
    display: grid;
    gap: 40px 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    margin: 0;
    overflow: visible;
    padding: 0;
  }

  /* Fill the (equal-width) column so every phone renders at the same size,
     regardless of how long each caption is. */
  .gallery-item {
    flex: initial;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
  }
}

/* Features */
.features {
  background: var(--ink);
  color: var(--snow);
  padding: 100px 0;
}

.features .neu-card {
  background: var(--snow);
  color: var(--ink);
  box-shadow: 6px 6px 0px var(--tangerine);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* Showcase */
.showcase {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 100px 24px;
}

@media (min-width: 900px) {
  .showcase {
    flex-direction: row-reverse;
    align-items: center;
  }
}

.showcase-content {
  flex: 1;
}
.showcase-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.showcase-price {
  font-weight: 800;
}

/* Policy-page header + metadata, used by /privacy/ and /terms/.
   Those pages reuse .hero on the header, which at >=900px becomes a flex row —
   laying the title, summary, and pills out in three columns. The landing hero
   is a <section>, not inside <main>, so scoping to `main .hero` straightens the
   policy header without touching the landing page. And .summary/.pill/.meta had
   no rules at all, so they rendered as plain unstyled text. */
main .hero { display: block; padding: 0; }
.summary { font-size: 1.15rem; max-width: 640px; opacity: 0.9; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Language toggle, used by /privacy/ and /terms/.
   The ES button writes .lang-es onto <body>; these are the rules that make it
   do anything. Without them both translations render stacked and the button
   appears to do nothing.
   Only ever hide, never set a display value: the footer wrappers carry an
   inline display:flex that a stylesheet rule must not clobber when shown.
   !important because that same inline style outranks these when hiding.
   Scoped under body because the script also sets <html lang="es">, and a bare
   [lang="es"] would match that and hide the whole document. */
body:not(.lang-es) [lang="es"] { display: none !important; }
body.lang-es [lang="en"] { display: none !important; }

/* Footer */
.footer {
  background: var(--tangerine);
  border-top: var(--border-thick);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-logo {
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-right a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.footer-right a:hover {
  text-decoration: underline;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.footer-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--snow);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-hover);
  color: var(--ink);
  font-weight: 800;
  padding: 8px 14px;
  text-decoration: none;
}

.footer-cta a svg {
  flex-shrink: 0;
}

.footer-cta a:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Tool Carousel */
.tool-carousel {
  padding: 60px 0;
}

.tool-carousel h2 {
  color: var(--ink);
  font-size: 2rem;
  margin-bottom: 30px;
}

.scroll-fade {
  position: relative;
}

.scroll-fade::before,
.scroll-fade::after {
  bottom: 0;
  content: "";
  pointer-events: none;
  position: absolute;
  top: 0;
  width: min(72px, 18vw);
  z-index: 2;
}

.scroll-fade::before {
  background: linear-gradient(to right, var(--snow), rgba(244, 246, 248, 0));
  left: 0;
}

.scroll-fade::after {
  background: linear-gradient(to left, var(--snow), rgba(244, 246, 248, 0));
  right: 0;
}

.horizontal-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-left: max(24px, calc((100vw - 1200px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1200px) / 2 + 24px));
  padding-top: 20px;
  padding-bottom: 20px;
  scroll-padding-left: max(24px, calc((100vw - 1200px) / 2 + 24px));
  scroll-snap-type: x proximity;
}
.horizontal-scroll::-webkit-scrollbar {
  display: none;
}
.scroll-track {
  display: flex;
  gap: 20px;
  width: max-content;
}
.tool-tile {
  flex: 0 0 178px;
  width: 178px;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--snow);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 18px 16px;
}
.tool-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hard);
}
.tool-icon {
  font-size: 2.75rem;
  color: var(--blaze);
  margin-bottom: 10px;
}
.tool-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.tool-sub {
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.68;
}

.feature-icon .material-symbols-outlined {
  font-size: 3rem;
  color: var(--blaze);
}

@media (max-width: 520px) {
  .container {
    padding: 0 24px;
  }

  .header {
    padding: 20px 0;
  }

  .logo {
    font-size: 1.25rem;
  }

  .nav a {
    margin-left: 16px;
  }

  .hero {
    display: grid;
    gap: 18px 16px;
    grid-template-columns: minmax(0, 1fr) 112px;
    padding: 48px 24px 32px;
  }

  .hero-content {
    display: contents;
  }

  .hero-title,
  .hero-subtitle {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .hero-title {
    font-size: clamp(2.3rem, 10vw, 2.65rem);
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }

  .hero .pricing-badge {
    grid-column: 1;
    grid-row: 3;
    margin-bottom: 0;
    padding: 14px 16px;
    width: 100%;
  }

  .hero .cta-group {
    flex-direction: column;
    gap: 10px;
    grid-column: 1;
    grid-row: 4;
  }

  .hero .hero-image {
    align-self: start;
    grid-column: 2;
    grid-row: 3 / span 2;
    justify-content: flex-end;
  }

  .hero .iphone-frame {
    max-width: 112px;
    width: 112px;
  }

  .hero .store-btn {
    justify-content: center;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .features,
  .showcase {
    padding-bottom: 80px;
    padding-top: 80px;
  }
}
