/* PingHabits website – https://www.pinghabits.com – playful + mascot */

:root {
  --color-bg: #fdfbf7;
  --color-bg-alt: #f5f2eb;
  --color-surface: #ffffff;
  --color-text: #1f1d1a;
  --color-text-muted: #5e5b56;
  --color-accent: #2d8a64;
  --color-accent-hover: #247a54;
  --color-accent-light: #e5f5ee;
  --color-warm: #e8a84a;
  --color-warm-light: #fef6e8;
  --color-border: #ebe8e1;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Sora", var(--font-sans);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow: 0 6px 28px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 8px 32px rgba(45, 138, 100, 0.12);
  --shadow-mascot: 0 12px 40px rgba(0, 0, 0, 0.08);
  --max-width: 1100px;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: 1.25rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
}

.logo svg {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--color-accent);
}

/* Hero */
.hero {
  padding: 24px 0 24px;
  text-align: center;
}

.hero-tagline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 20px;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 42ch;
  margin: 0 auto 36px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.cta-primary:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
  transform: translateY(-2px) scale(1.02);
}

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

.cta-primary svg {
  width: 22px;
  height: 22px;
}

.app-store-badge-link {
  display: inline-block;
  line-height: 0;
}

.app-store-badge-link:hover {
  text-decoration: none;
}

/* Screenshots */
.screenshots {
  padding: 48px 0 24px;
  background: var(--color-bg-alt);
}

.screenshots h2 {
  text-align: center;
  margin: 0 0 12px;
}

.screenshots .subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 40px;
  font-size: 1.05rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: end;
  justify-items: center;
}

.screenshot-card {
  background: var(--color-surface);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 280px;
  border: 2px solid var(--color-border);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9/19;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 9/19;
  background: linear-gradient(160deg, var(--color-accent-light) 0%, var(--color-warm-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Features */
.features {
  padding: 24px 0;
}

.features h2 {
  text-align: center;
  margin: 0 0 12px;
}

.features .subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 48px;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--color-surface);
  padding: 28px;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.feature-card .icon {
  width: 52px;
  height: 52px;
  background: var(--color-accent-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--color-accent);
}

.feature-card .icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

/* CTA block */
.cta-block {
  padding: 72px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--color-accent-light) 0%, var(--color-warm-light) 40%, var(--color-bg) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.cta-block h2 {
  margin: 0 0 16px;
}

.cta-block p {
  color: var(--color-text-muted);
  margin: 0 0 28px;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

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

.footer-brand .logo {
  margin-bottom: 12px;
}

.footer-brand p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 32ch;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--color-text);
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  text-decoration: none;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

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

.footer-legal a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Legal pages */
.legal-page {
  padding: 48px 0 80px;
}

.legal-page h1 {
  margin: 0 0 12px;
}

.legal-page .updated {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.legal-page h3 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
}

.legal-page p,
.legal-page li {
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.legal-page ul {
  padding-left: 1.4em;
  margin: 0 0 16px;
}

.legal-page a {
  word-break: break-all;
}

/* Playful: mascot + speech */
.hero-with-mascot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 0 56px;
  text-align: left;
}

.hero-mascot-wrap {
  flex-shrink: 0;
}

.hero-mascot-wrap img {
  width: 160px;
  height: auto;
  filter: drop-shadow(var(--shadow-mascot));
  transform: rotate(-3deg);
}

.hero-content {
  flex: 1;
  min-width: 280px;
  max-width: 520px;
}

.hero-content .hero-tagline { text-align: left; margin-left: 0; }
.hero-content h1 { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
.hero-content .hero-desc { text-align: left; margin-left: 0; margin-right: 0; }
.hero-content .cta-wrap { text-align: left; }

.mascot-speech {
  position: relative;
  background: var(--color-surface);
  padding: 20px 24px;
  border-radius: 20px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.mascot-speech::before {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 32px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 14px solid var(--color-surface);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.06));
}

.mascot-speech::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 28px;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 18px solid var(--color-border);
}

.mascot-speech p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--color-text);
}

.mascot-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.mascot-block .mascot-figure {
  flex-shrink: 0;
}

.mascot-block .mascot-figure img {
  width: 100px;
  height: auto;
  filter: drop-shadow(var(--shadow-mascot));
}

.mascot-block .mascot-speech {
  flex: 1;
  min-width: 240px;
  margin-bottom: 0;
}

.mascot-block.mascot-right {
  flex-direction: row-reverse;
}

.mascot-block.mascot-right .mascot-speech::before {
  left: auto;
  right: 32px;
}

.mascot-block.mascot-right .mascot-speech::after {
  left: auto;
  right: 28px;
}

.section-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.section-intro .mascot-figure img {
  width: 88px;
  height: auto;
  filter: drop-shadow(var(--shadow-mascot));
}

.section-intro .mascot-speech {
  max-width: 480px;
  margin-bottom: 0;
}

.cta-mascot {
  margin-top: 32px;
}

.cta-mascot img {
  width: 120px;
  height: auto;
  margin: 0 auto 16px;
  filter: drop-shadow(var(--shadow-mascot));
  animation: mascot-bounce 2s ease-in-out infinite;
}

@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.site-header {
  background: rgba(253, 251, 247, 0.92);
}

@media (max-width: 640px) {
  .hero-with-mascot {
    flex-direction: column;
    text-align: center;
    padding: 32px 0 48px;
  }
  .hero-content .hero-tagline,
  .hero-content h1,
  .hero-content .hero-desc,
  .hero-content .cta-wrap {
    text-align: center;
  }
  .hero-content .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-mascot-wrap img {
    transform: none;
  }
  .mascot-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .mascot-block .mascot-speech::before {
    left: 50%;
    right: auto;
    margin-left: -14px;
  }
  .mascot-block .mascot-speech::after {
    left: 50%;
    right: auto;
    margin-left: -18px;
  }
  .section-intro {
    flex-direction: column;
    text-align: center;
  }
  .section-intro .mascot-speech::before {
    left: 50%;
    right: auto;
    margin-left: -14px;
  }
  .section-intro .mascot-speech::after {
    left: 50%;
    right: auto;
    margin-left: -18px;
  }
}
