/*
Theme Name: Keystone
Theme URI: https://keystone.app
Author: Keystone
Author URI: https://keystone.app
Description: AI-Powered Language Learning — Build the Bridge to Every Conversation
Version: 1.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: keystone-theme
*/

/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F5F0EB;
  color: #3C3633;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: #B87333;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* === LAYOUT === */
.ks-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === HEADER === */
.ks-header {
  background: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(60, 54, 51, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.ks-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #3C3633;
}

.ks-logo-icon {
  width: 36px;
  height: 36px;
  background: #D4A574;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ks-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ks-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3C3633;
  transition: background 0.15s;
}

.ks-nav a:hover {
  background: rgba(60, 54, 51, 0.06);
  text-decoration: none;
}

.ks-nav .ks-btn-sm {
  padding: 8px 18px;
}

/* === BUTTONS === */
.ks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}

.ks-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.ks-btn:active {
  transform: translateY(0);
}

.ks-btn-primary {
  background: #B87333;
  color: #fff;
  box-shadow: 0 4px 14px rgba(184, 115, 51, 0.3);
}

.ks-btn-primary:hover {
  background: #a0622a;
  box-shadow: 0 6px 20px rgba(184, 115, 51, 0.35);
}

.ks-btn-outline {
  background: transparent;
  color: #3C3633;
  border: 2px solid rgba(60, 54, 51, 0.15);
}

.ks-btn-outline:hover {
  border-color: #B87333;
  color: #B87333;
  background: rgba(184, 115, 51, 0.04);
}

.ks-btn-block {
  width: 100%;
}

.ks-btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 14px;
}

.ks-btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

/* === HERO === */
.ks-hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.ks-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.ks-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(184, 115, 51, 0.1);
  color: #B87333;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.ks-hero-title {
  font-size: 3.2rem;
  color: #3C3633;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.ks-hero-title span {
  color: #B87333;
}

.ks-hero-subtitle {
  font-size: 1.125rem;
  color: rgba(60, 54, 51, 0.65);
  max-width: 480px;
  margin-bottom: 32px;
}

.ks-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ks-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ks-hero-card-stack {
  position: relative;
  width: 320px;
  height: 380px;
}

.ks-hero-card {
  position: absolute;
  width: 280px;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(60, 54, 51, 0.12);
  border: 1px solid rgba(60, 54, 51, 0.06);
}

.ks-hero-card-1 {
  z-index: 3;
  top: 0;
  left: 0;
}

.ks-hero-card-2 {
  z-index: 2;
  top: 16px;
  left: 20px;
  opacity: 0.6;
}

.ks-hero-card-3 {
  z-index: 1;
  top: 32px;
  left: 40px;
  opacity: 0.3;
}

.ks-hero-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ks-hero-card-avatar {
  width: 44px;
  height: 44px;
  background: #D4A574;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.ks-hero-card-meta h4 {
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.ks-hero-card-meta span {
  font-size: 0.75rem;
  color: rgba(60, 54, 51, 0.5);
}

.ks-hero-card-bar {
  height: 8px;
  background: rgba(60, 54, 51, 0.08);
  border-radius: 100px;
  margin-bottom: 16px;
  overflow: hidden;
}

.ks-hero-card-bar-fill {
  height: 100%;
  background: #5B8C5A;
  border-radius: 100px;
}

.ks-hero-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ks-hero-card-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #3C3633;
}

.ks-hero-card-stat-label {
  font-size: 0.6875rem;
  color: rgba(60, 54, 51, 0.5);
}

.ks-float {
  position: absolute;
  background: #fff;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(60, 54, 51, 0.1);
  border: 1px solid rgba(60, 54, 51, 0.06);
}

.ks-float-1 {
  top: 10%;
  right: 0;
  animation: ks-float 4s ease-in-out infinite;
}

.ks-float-2 {
  bottom: 20%;
  left: -20px;
  animation: ks-float 4s ease-in-out infinite 1s;
}

.ks-float-3 {
  top: 40%;
  right: -10px;
  animation: ks-float 4s ease-in-out infinite 2s;
}

@keyframes ks-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* === TRUST BAR === */
.ks-trust {
  padding: 20px 0;
  border-top: 1px solid rgba(60, 54, 51, 0.06);
}

.ks-trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ks-trust-label {
  font-size: 0.8125rem;
  color: rgba(60, 54, 51, 0.45);
  font-weight: 500;
}

.ks-trust-logos {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ks-trust-logo {
  font-size: 0.8125rem;
  color: rgba(60, 54, 51, 0.55);
  font-weight: 500;
}

/* === SECTIONS === */
.ks-section {
  padding: 80px 0;
}

.ks-section-header {
  max-width: 560px;
  margin-bottom: 48px;
}

.ks-section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.ks-section-header p {
  font-size: 1.0625rem;
  color: rgba(60, 54, 51, 0.6);
}

.ks-section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #B87333;
  margin-bottom: 12px;
}

/* === FEATURES === */
.ks-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ks-feature-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(60, 54, 51, 0.06);
  box-shadow: 0 4px 20px rgba(60, 54, 51, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ks-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(60, 54, 51, 0.08);
}

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

.ks-feature-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.ks-feature-card p {
  font-size: 0.875rem;
  color: rgba(60, 54, 51, 0.6);
  line-height: 1.5;
}

/* === STEPS === */
.ks-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.ks-step {
  position: relative;
}

.ks-step-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(212, 165, 116, 0.25);
  line-height: 1;
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

.ks-step-icon {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.ks-step h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.ks-step p {
  font-size: 0.9375rem;
  color: rgba(60, 54, 51, 0.6);
}

/* === LANGUAGES === */
.ks-languages-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.ks-language-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  border: 1px solid rgba(60, 54, 51, 0.06);
  box-shadow: 0 2px 12px rgba(60, 54, 51, 0.03);
  transition: transform 0.15s;
}

.ks-language-card:hover {
  transform: translateY(-2px);
}

.ks-language-flag {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 8px;
}

.ks-language-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.ks-language-count {
  font-size: 0.75rem;
  color: rgba(60, 54, 51, 0.45);
  margin-top: 2px;
}

/* === PRICING === */
.ks-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ks-pricing-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(60, 54, 51, 0.06);
  box-shadow: 0 4px 20px rgba(60, 54, 51, 0.04);
  position: relative;
}

.ks-pricing-popular {
  border-color: #D4A574;
  box-shadow: 0 8px 32px rgba(184, 115, 51, 0.12);
}

.ks-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #B87333;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 16px;
  border-radius: 100px;
}

.ks-pricing-card h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.ks-pricing-desc {
  font-size: 0.875rem;
  color: rgba(60, 54, 51, 0.55);
  margin-bottom: 20px;
}

.ks-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 24px;
}

.ks-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: #3C3633;
}

.ks-amount {
  font-size: 3rem;
  font-weight: 800;
  color: #3C3633;
  line-height: 1;
}

.ks-period {
  font-size: 0.9375rem;
  color: rgba(60, 54, 51, 0.5);
}

.ks-pricing-features {
  list-style: none;
  margin-bottom: 28px;
}

.ks-pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9375rem;
  color: rgba(60, 54, 51, 0.75);
  border-bottom: 1px solid rgba(60, 54, 51, 0.04);
}

.ks-check {
  color: #5B8C5A;
  font-weight: 700;
}

/* === CTA === */
.ks-cta {
  padding: 80px 0;
}

.ks-cta-inner {
  background: #3C3633;
  border-radius: 28px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ks-cta-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(212, 165, 116, 0.08) 0%, transparent 60%);
}

.ks-cta-inner h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 12px;
  position: relative;
}

.ks-cta-inner p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.0625rem;
  margin-bottom: 28px;
  position: relative;
}

.ks-cta-small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.875rem;
  margin-top: 16px;
  position: relative;
}

.ks-cta-small a {
  color: #D4A574;
}

/* === FOOTER === */
.ks-footer {
  padding: 40px 0;
  border-top: 1px solid rgba(60, 54, 51, 0.06);
  text-align: center;
}

.ks-footer p {
  font-size: 0.8125rem;
  color: rgba(60, 54, 51, 0.4);
}

/* === AUTH PAGES === */
.ks-auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.ks-auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(60, 54, 51, 0.1);
  border: 1px solid rgba(60, 54, 51, 0.06);
}

.ks-auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.ks-auth-header .ks-logo-icon {
  margin: 0 auto 16px;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
}

.ks-auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.ks-auth-header p {
  font-size: 0.9375rem;
  color: rgba(60, 54, 51, 0.55);
}

.ks-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ks-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ks-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #3C3633;
}

.ks-field input {
  padding: 12px 16px;
  border: 2px solid rgba(60, 54, 51, 0.1);
  border-radius: 12px;
  font-size: 0.9375rem;
  background: #fff;
  transition: border-color 0.15s;
  font-family: inherit;
}

.ks-field input:focus {
  outline: none;
  border-color: #D4A574;
}

.ks-field-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.ks-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  cursor: pointer;
}

.ks-checkbox input {
  width: auto;
}

.ks-auth-link {
  font-size: 0.875rem;
  color: #B87333;
}

.ks-auth-link:hover {
  text-decoration: underline;
}

.ks-auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(60, 54, 51, 0.06);
}

.ks-auth-footer p {
  font-size: 0.875rem;
  color: rgba(60, 54, 51, 0.55);
}

.ks-auth-footer a {
  color: #B87333;
  font-weight: 600;
}

.ks-auth-notice {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.ks-auth-success {
  background: rgba(91, 140, 90, 0.1);
  color: #5B8C5A;
}

.ks-auth-error {
  background: rgba(196, 114, 79, 0.1);
  color: #C4724F;
}

/* === DASHBOARD === */
.ks-dashboard-wrap {
  min-height: calc(100vh - 64px);
}

/* === 404 === */
.ks-404 {
  text-align: center;
  padding: 120px 24px;
}

.ks-404 h1 {
  font-size: 6rem;
  color: #D4A574;
  line-height: 1;
}

.ks-404 h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.ks-404 p {
  color: rgba(60, 54, 51, 0.55);
  margin-bottom: 24px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .ks-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ks-languages-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .ks-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ks-hero-title {
    font-size: 2.25rem;
  }

  .ks-hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .ks-hero-actions {
    justify-content: center;
  }

  .ks-hero-visual {
    display: none;
  }

  .ks-features-grid {
    grid-template-columns: 1fr;
  }

  .ks-steps-grid {
    grid-template-columns: 1fr;
  }

  .ks-languages-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ks-pricing-grid {
    grid-template-columns: 1fr;
  }

  .ks-nav {
    display: none;
  }

  .ks-section-header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .ks-cta-inner {
    padding: 48px 24px;
  }
}