/* Shared base */
html {
  scrollbar-gutter: stable;
  scroll-padding-top: 4rem;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: #2c7be5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
  padding-left: 0;
}

footer {
  text-align: center;
  padding: 1.75rem 1rem 1.5rem;
  font-size: 0.85em;
  color: #888;
  border-top: 1px solid #ececec;
  margin-top: auto;
  letter-spacing: 0.005em;
}

footer p {
  margin: 0.5em 0;
}

footer a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* Premium focus state for keyboard users */
.app-card:focus-visible,
.app-item:focus-visible,
.topbar .brand:focus-visible {
  outline: 2px solid rgba(44, 123, 229, 0.45);
  outline-offset: 3px;
}

/* Sticky site top bar with brand link */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.125rem 0;
}

@media (max-width: 720px) {
  .topbar {
    background: #f9f9f9;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem 0 clamp(1rem, 3.5vw, 3rem);
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #111;
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.topbar .brand-logo {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  display: block;
  margin-top: 2px;
}

.topbar .brand:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Landing page */
body.home header {
  padding: clamp(1.25rem, 3vw, 2rem) 1rem clamp(0.65rem, 1.6vw, 1.25rem);
  text-align: center;
}

body.home header h1 {
  font-size: clamp(1.5em, 4.5vw, 1.75em);
  margin: 0;
  font-weight: 600;
  color: #0f0f0f;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

body.home header .hero-sub {
  font-size: clamp(0.96em, 3.2vw, 1.02em);
  color: #555;
  max-width: 580px;
  margin: clamp(0.65rem, 2vw, 0.85rem) auto 0;
  line-height: 1.55;
  text-wrap: pretty;
}

body.home main {
  max-width: 780px;
  margin: clamp(0.75rem, 2vw, 1rem) auto clamp(1.5rem, 4vw, 2rem);
  padding: 0 1rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }
}

.app-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.app-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.app-card img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
}

.app-card img.icon-light {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.app-card-body {
  flex: 1;
  min-width: 0;
}

.app-card-body h2 {
  font-size: 1.1em;
  margin: 0 0 0.35em;
  font-weight: 600;
  color: #111;
}

.app-card-body p {
  font-size: 0.92em;
  color: #555;
  margin: 0;
  line-height: 1.45;
}

/* Featured (primary) app card on the homepage */
.featured-app {
  margin-top: 0.5rem;
  position: relative;
}

.app-card.featured {
  padding: clamp(1.1rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 2rem);
  border-radius: clamp(14px, 3vw, 18px);
  gap: clamp(0.85rem, 3vw, 1.75rem);
  align-items: flex-start;
  background: #ffffff;
  /* Layered shadow with ultra-subtle ambient brand glow (third stop) */
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 8px 24px rgba(15, 15, 15, 0.04),
    0 28px 80px rgba(44, 123, 229, 0.08);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.3s ease;
}

.app-card.featured:hover {
  transform: translateY(-4px);
  background: #fcfcfd;
  box-shadow:
    0 2px 3px rgba(15, 15, 15, 0.06),
    0 16px 40px rgba(15, 15, 15, 0.07),
    0 38px 110px rgba(44, 123, 229, 0.16);
}

.app-card.featured img {
  width: clamp(74px, 18.5vw, 96px);
  height: clamp(74px, 18.5vw, 96px);
  border-radius: clamp(16px, 4.2vw, 22px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.app-card.featured .app-card-body h2 {
  font-size: clamp(1.25em, 4.2vw, 1.4em);
  margin: 0 0 clamp(0.4rem, 1.5vw, 0.5rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  color: #0f0f0f;
  line-height: 1.25;
  text-wrap: balance;
}

.app-card.featured .featured-desc {
  font-size: clamp(0.93em, 3.4vw, 0.97em);
  color: #444;
  line-height: 1.6;
  margin: 0 0 clamp(0.6rem, 2vw, 0.95rem);
  text-wrap: pretty;
}

/* Premium micro-button CTA */
.app-card.featured .featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85em;
  font-weight: 500;
  color: #444;
  letter-spacing: 0.005em;
  padding: 0.5em 0.95em;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  background: transparent;
  transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card.featured .featured-cta .cta-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-size: 1em;
}

.app-card.featured:hover .featured-cta,
.app-card.featured:focus-visible .featured-cta {
  color: #0f0f0f;
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.14);
}

.app-card.featured:hover .featured-cta .cta-arrow,
.app-card.featured:focus-visible .featured-cta .cta-arrow {
  transform: translate(2px, -2px);
}

@media (max-width: 520px) {
  .app-card.featured {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .app-card.featured img {
    margin: 0 auto;
  }
  .app-card.featured .featured-cta {
    align-self: center;
  }
}

/* "More Apps" secondary apps section */
.more-apps {
  margin-top: 2rem;
}

.more-apps h2 {
  font-size: 1.15em;
  margin: 0 0 0.95rem;
  font-weight: 500;
  color: #222;
  letter-spacing: -0.005em;
  text-align: left;
  padding-left: 0.25rem;
  line-height: 1.3;
}

.apps-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 175px));
  gap: 1rem;
}

.app-item {
  background: #fff;
  border-radius: 14px;
  padding: 0.85rem 0.85rem 0.8rem;
  min-width: 0;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.03);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.3s ease;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94em;
  display: block;
}

.app-item:hover {
  transform: translateY(-2px);
  background: #fcfcfd;
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.05),
    0 10px 24px rgba(15, 15, 15, 0.09);
  text-decoration: none;
}

.app-item img {
  width: 68px;
  height: 68px;
  border-radius: 15px;
  margin: 0 auto 0.5rem;
  display: block;
}

@media (max-width: 560px) {
  .apps-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-item img.icon-light {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.app-item .platform-note {
  display: block;
  font-size: 0.7em;
  font-weight: 500;
  color: #888;
  margin-top: 0.35em;
  letter-spacing: 0.025em;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .apps-list {
    justify-content: center;
  }
}

/* App detail page */
body.app-detail header {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1.25rem);
  text-align: center;
}

body.app-detail header h1 {
  font-size: clamp(1.7em, 5.5vw, 2.5em);
  margin-bottom: 0.3em;
  line-height: 1.15;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

body.app-detail header .tagline {
  font-size: clamp(1.02em, 3.5vw, 1.2em);
  color: #555;
  margin-bottom: clamp(0.85rem, 2.5vw, 1.25rem);
  line-height: 1.45;
  text-wrap: pretty;
}

body.app-detail .hero-description {
  width: min(700px, 92%);
  margin: 0 auto clamp(1rem, 3vw, 1.5rem);
  font-size: clamp(0.98em, 3vw, 1.05em);
  color: #444;
  line-height: 1.65;
  text-wrap: pretty;
}

body.app-detail main {
  max-width: 900px;
  margin: 2rem auto clamp(1.25rem, 2.5vw, 2rem);
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

body.app-detail h2 {
  margin-top: 2rem;
  font-size: clamp(1.45em, 4.5vw, 1.6em);
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
}

.google-play img {
  height: clamp(46px, 13vw, 60px);
}

.screenshot {
  text-align: center;
  margin-top: 40px;
}

.screenshot img {
  max-width: 300px;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

.features,
.usage,
.testimonial,
.contact {
  background: #fff;
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 2.5vw, 1.75rem);
  margin-top: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.features h2,
.usage h2,
.testimonial h2 {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

.features li,
.usage li {
  margin-bottom: 0.7rem;
  line-height: 1.5;
}

.features li:last-child,
.usage li:last-child {
  margin-bottom: 0;
}

.features li::before,
.usage li::before {
  content: "\2713";
  color: #2c7be5;
  margin-right: 10px;
  font-weight: bold;
}

.testimonial {
  overflow: visible;
}

.testimonial blockquote {
  font-style: italic;
  background: rgba(0, 0, 0, 0.022);
  padding: clamp(0.95rem, 2.8vw, 1.2rem) clamp(1.1rem, 3.5vw, 1.5rem);
  border-left: 2px solid rgba(44, 123, 229, 0.32);
  border-radius: 0 6px 6px 0;
  margin: 0;
  color: #2a2a2a;
  line-height: 1.6;
  font-size: clamp(0.96em, 3vw, 1em);
  height: auto;
  overflow: visible;
}

/* Closing motivational block (used on Brush Timer page) */
.motivation {
  margin: 3rem 0 1rem;
  padding: 2rem 1rem;
  text-align: center;
}

.motivation p {
  font-size: 1.2em;
  line-height: 1.55;
  margin: 0 0 0.75em;
  color: #444;
}

.motivation p:first-child {
  font-weight: 600;
  color: #222;
}

.motivation p:last-child {
  margin-bottom: 0;
  font-size: 1.02em;
  color: #666;
}

/* Store badges row: Google Play + iOS coming-soon pill */
.store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-badges .store-badge {
  height: 60px;
  display: block;
}

.ios-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: 60px;
  padding: 0 1.1rem;
  background: #f4f5f7;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #444;
  box-sizing: border-box;
}

.ios-coming-soon svg {
  width: 22px;
  height: 22px;
  color: #222;
  flex-shrink: 0;
}

.ios-coming-soon-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.ios-coming-soon-text .small {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  font-weight: 500;
}

.ios-coming-soon-text .big {
  font-size: 1.1em;
  font-weight: 600;
  color: #222;
}

/* Three-screenshot row used on app detail pages */
.screenshots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  max-width: clamp(560px, 70vw, 800px);
  margin: 40px auto 0;
  padding: 0 1rem;
}

.screenshots-row img {
  width: 100%;
  aspect-ratio: 9 / 20;
  height: auto;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: block;
}

@media (max-width: 720px) {
  .screenshots-row {
    grid-template-columns: 1fr;
    max-width: 280px;
  }
}

/* Privacy policy pages */
body.privacy main {
  max-width: 720px;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
  font-size: 1.05em;
  line-height: 1.75;
  color: #222;
}

body.privacy h1 {
  font-size: 2.6em;
  margin: 0 0 0.2em;
  font-weight: 700;
  color: #0f0f0f;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

body.privacy main > p:first-of-type {
  color: #888;
  font-size: 0.95em;
  margin: 0 0 2.5em;
}

body.privacy h2 {
  font-size: 1.55em;
  margin: 2.6em 0 0.6em;
  font-weight: 700;
  color: #0f0f0f;
  letter-spacing: -0.01em;
}

body.privacy h3 {
  font-size: 1.18em;
  margin: 2em 0 0.5em;
  font-weight: 600;
  color: #222;
}

body.privacy p {
  margin: 0 0 1.1em;
}

body.privacy ul {
  list-style: disc;
  padding-left: 1.5em;
  margin: 0 0 1.3em;
}

body.privacy li {
  margin-bottom: 0.55em;
}

body.privacy strong {
  color: #0f0f0f;
  font-weight: 600;
}

body.privacy a {
  color: #2c7be5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.privacy a:hover {
  color: #1a5fc4;
}

@media (max-width: 600px) {
  body.privacy main {
    margin: 1.5rem auto 2.5rem;
    font-size: 1em;
  }

  body.privacy h1 {
    font-size: 2em;
  }

  body.privacy h2 {
    font-size: 1.3em;
  }
}

/* 404 page */
body.error main {
  max-width: 600px;
  margin: 6rem auto;
  padding: 0 1rem;
  text-align: center;
}

body.error h1 {
  font-size: 6em;
  margin: 0;
  color: #2c7be5;
  font-weight: 700;
}

body.error p {
  font-size: 1.15em;
  color: #555;
  margin: 0.5em 0 2em;
}
