@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background-color: #FAFAF8;
  color: #1A1A1A;
  font-size: 15px;
  line-height: 26px;
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 80px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

nav .logo {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  color: #1A1A1A;
  text-decoration: none;
}

nav .links {
  display: flex;
  gap: 32px;
}

nav .links a {
  font-size: 14px;
  font-weight: 500;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

nav .links a:hover {
  color: #1A1A1A;
}

nav .links a.active {
  color: #1A1A1A;
  font-weight: 600;
}

/* Footer */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 80px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

footer p {
  font-size: 13px;
  color: #BBB;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 40px 80px 0;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 76px - 64px);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 480px;
}

.hero-text h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 68px;
  color: #1A1A1A;
}

.hero-text p {
  font-size: 18px;
  color: #888;
  line-height: 28px;
}

.store-badges {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  background: #000;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  transition: opacity 0.2s;
}

.store-badge:hover {
  opacity: 0.85;
}

.store-badge .badge-text small {
  display: block;
  font-size: 9px;
  color: rgba(255,255,255,0.8);
  line-height: 11px;
}

.store-badge .badge-text span {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  line-height: 21px;
  letter-spacing: -0.01em;
}

/* Phone mockup */
.phone-mockup-wrapper {
  flex-shrink: 0;
  width: 390px;
  height: 760px;
}

.phone-mockup {
  width: 390px;
  height: 760px;
  border-radius: 40px;
  overflow: hidden;
  background: #FAFAF8;
  box-shadow: 0 24px 80px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  transform-origin: top center;
}

.phone-inner {
  width: 390px;
  height: 844px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Phone status bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  height: 44px;
  flex-shrink: 0;
}

.status-bar .time {
  font-weight: 600;
  font-size: 15px;
  color: #1A1A1A;
}

.status-bar .icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Phone header */
.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 0;
  flex-shrink: 0;
}

.phone-header .title {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  letter-spacing: 0.01em;
  color: #1A1A1A;
}

.phone-header .help-btn {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: 1.5px solid #D0D0CC;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8A8A85;
  font-weight: 500;
  font-size: 16px;
}

/* Progress section */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 24px 0;
  flex-shrink: 0;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.progress-labels .rank {
  font-family: 'Instrument Serif', serif;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.05em;
  color: #2B4F6E;
}

.progress-labels .count {
  font-size: 13px;
  color: #8A8A85;
}

.progress-bar {
  height: 3px;
  background: #EDEDEA;
  border-radius: 2px;
}

.progress-bar .fill {
  height: 3px;
  background: #2B4F6E;
  border-radius: 2px;
  width: 10%;
}

.progress-hint {
  font-size: 13px;
  color: #AAA;
  padding-top: 2px;
}

/* Found words grid */
.found-words {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 24px 0;
  flex-shrink: 0;
}

.found-row {
  display: flex;
  gap: 6px;
}

.found-cell {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
}

.found-cell.filled {
  background: #2B4F6E;
}

.found-cell.filled .num {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 500;
  width: 18px;
  flex-shrink: 0;
}

.found-cell.filled .word {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.found-cell.empty {
  border: 1.5px dashed #E0E0DC;
}

.found-cell.empty .num {
  color: #CCC;
  font-size: 11px;
  font-weight: 500;
}

.found-chevron {
  display: flex;
  justify-content: center;
  padding: 2px 0;
}

/* Word input */
.word-input-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 10px;
  border-bottom: 1.5px solid #EDEDEA;
  flex-shrink: 0;
}

.word-input-area svg {
  flex-shrink: 0;
}

.word-input-area span {
  color: #C0C0BC;
  font-size: 16px;
}

/* Letter grid */
.letter-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px 36px;
  flex-grow: 1;
  justify-content: center;
}

.letter-row {
  display: flex;
  gap: 10px;
}

.letter-cell {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  background: #F7F7F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1A1A1A;
}

.letter-cell.center {
  background: #2B4F6E;
  color: #fff;
}

/* Action bar */
.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 36px;
  flex-shrink: 0;
}

.action-bar .back-btn {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: #F2F2F0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-bar .clear-btn {
  height: 44px;
  border-radius: 22px;
  background: #F2F2F0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8A8A85;
}

.action-bar .submit-btn {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  background: #2B4F6E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

/* Content pages */
.page-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.page-content .page-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-content .page-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 48px;
  color: #1A1A1A;
}

.page-content .page-header .date {
  font-size: 14px;
  color: #B0B0AC;
}

.page-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-sections section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-sections section h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
  color: #1A1A1A;
}

.page-sections section p {
  color: #5C5C5A;
}

.page-sections section ul {
  color: #5C5C5A;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-sections section a {
  color: #1B5E42;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-sections section a:hover {
  color: #144832;
}

/* Support page */
.support-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  padding: 120px 40px 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.support-hero .intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  text-align: center;
}

.support-hero .intro h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 48px;
  font-weight: 400;
  color: #1A1A1A;
}

.support-hero .intro p {
  font-size: 17px;
  color: #6B6B6B;
  line-height: 28px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 80px;
  border-radius: 16px;
  background: #F5F5F2;
}

.contact-card .label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #1B5E42;
  text-transform: uppercase;
}

.contact-card .email {
  font-size: 20px;
  font-weight: 500;
  color: #1A1A1A;
}

.contact-card .response {
  font-size: 15px;
  color: #6B6B6B;
}

.faq-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 0 40px 80px;
  max-width: 640px;
  margin: 0 auto;
}

.faq-section .faq-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #999;
  text-transform: uppercase;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.faq-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-item h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1A1A1A;
}

.faq-item p {
  font-size: 15px;
  color: #6B6B6B;
  line-height: 24px;
}

.faq-divider {
  height: 1px;
  background: #E8E8E5;
  width: 100%;
}

/* Responsive — wide tablets / small desktops */
@media (max-width: 1200px) {
  .phone-mockup { transform: scale(0.85); }
  .phone-mockup-wrapper { width: calc(390px * 0.85); height: calc(760px * 0.85); }

  .hero {
    gap: 40px;
    padding: 40px 48px 0;
  }
}

/* Tablets */
@media (max-width: 960px) {
  nav { padding: 20px 32px; }
  footer { padding: 20px 32px; }

  .hero {
    flex-direction: column;
    align-items: center;
    padding: 40px 32px;
    gap: 48px;
    min-height: auto;
  }

  .hero-text {
    align-items: center;
    text-align: center;
    max-width: 560px;
  }

  .store-badges { justify-content: center; }

  .phone-mockup { transform: scale(0.8); }
  .phone-mockup-wrapper { width: calc(390px * 0.8); height: calc(760px * 0.8); }

  .support-hero { padding: 80px 32px 60px; }
}

/* Mobile */
@media (max-width: 640px) {
  nav { padding: 16px 20px; }
  nav .links { gap: 20px; }
  footer { padding: 16px 20px; }

  .hero {
    padding: 24px 20px;
    gap: 36px;
  }

  .hero-text h1 { font-size: 40px; line-height: 44px; }
  .hero-text p { font-size: 16px; line-height: 24px; }

  .phone-mockup { transform: scale(0.75); }
  .phone-mockup-wrapper { width: calc(390px * 0.75); height: calc(760px * 0.75); }

  .store-badges { flex-direction: column; gap: 8px; width: 100%; }
  .store-badge { justify-content: center; }

  .page-content .page-header h1 { font-size: 32px; line-height: 38px; }
  .support-hero { padding: 60px 20px 40px; gap: 40px; }
  .support-hero .intro h1 { font-size: 36px; }
  .contact-card { padding: 32px 24px; width: 100%; }
  .faq-section { padding: 0 20px 60px; }
}

/* Very small */
@media (max-width: 420px) {
  .phone-mockup { transform: scale(0.65); }
  .phone-mockup-wrapper { width: calc(390px * 0.65); height: calc(760px * 0.65); }
  .hero-text h1 { font-size: 32px; line-height: 36px; }
}
