/* hallmark · v2.0.0 · Skazki AI Core Stylesheet */
/* Dusk Nocturne + Starry Sky + Apple Cobalt + iPhone 18 Frame + Dual Floating Cards */

@import url("./hallmark-tokens.css");

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

html, body {
  overflow-x: clip;
  width: 100%;
  min-height: 100%;
  background: var(--color-paper) var(--bg-stars);
  background-attachment: fixed;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   FOCUS ACCESSIBILITY
   ========================================================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* ==========================================================================
   LAYOUT SHELL (DESKTOP SINGLE-BLOCK 100dvh)
   ========================================================================== */
.viewport-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 36px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-ink);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-btn);
  object-fit: cover;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.4);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.lang-btn {
  background-color: var(--color-paper-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--rule-hair) solid var(--color-rule);
  color: var(--color-ink);
  padding: 5px 14px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform var(--dur-short) var(--ease-out);
}

.lang-btn:hover {
  background-color: var(--color-paper-3);
  border-color: var(--color-rule-2);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO STAGE
   ========================================================================== */
.hero-stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding: 10px 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.badge-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-paper-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--rule-hair) solid var(--color-rule);
  color: var(--color-ink-2);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-tag-signal {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.6vw, 3.15rem);
  font-weight: var(--display-weight);
  line-height: var(--display-line-height);
  letter-spacing: var(--display-tracking);
  color: var(--color-ink);
  overflow-wrap: break-word;
  min-width: 0;
}

.hero-sentence {
  font-size: 1.05rem;
  color: var(--color-ink-2);
  max-width: 530px;
  line-height: 1.5;
}

/* ==========================================================================
   HALLMARK SIGNATURE CARDS (4-ITEMS GRID)
   ========================================================================== */
.signature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.feature-pill {
  background-color: var(--color-paper-3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: 16px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.45);
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.feature-pill:hover {
  transform: translateY(-1.5px);
  border-color: var(--color-accent);
}

.feature-pill-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.feature-pill-icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-pill-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.feature-pill-desc {
  font-size: 0.72rem;
  color: var(--color-muted);
  line-height: 1.35;
}

/* ==========================================================================
   CALL TO ACTION GROUP (IDENTICAL 48PX BUTTON HEIGHTS)
   ========================================================================== */
.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  min-height: 48px;
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border: var(--rule-hair) solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: opacity var(--dur-short) var(--ease-out),
              transform var(--dur-short) var(--ease-out),
              box-shadow var(--dur-short) var(--ease-out);
}

.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1.5px);
  box-shadow: 0 8px 26px -2px rgba(0, 113, 227, 0.6);
}

/* Exact same 48px height for secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-height: 48px;
  background-color: var(--color-paper-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--color-ink);
  padding: 0 22px;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: var(--rule-hair) solid var(--color-rule);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform var(--dur-short) var(--ease-out);
}

.btn-secondary:hover {
  background-color: var(--color-paper-3);
  border-color: var(--color-rule-2);
  transform: translateY(-1px);
}

/* ==========================================================================
   REALISTIC iPHONE 18 PRO FRAME (FRONT-FACING)
   ========================================================================== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.device-frame {
  position: relative;
  width: 100%;
  max-width: 295px;
  background: linear-gradient(145deg, #2a2c36 0%, #161720 50%, #2e303d 100%);
  border-radius: 50px;
  padding: 3.5px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 0 0 2.5px rgba(22, 23, 30, 0.95),
    0 32px 70px -15px rgba(0, 0, 0, 0.85),
    0 12px 28px -6px rgba(0, 113, 227, 0.25);
}

/* Hardware Buttons */
.device-frame::before {
  content: "";
  position: absolute;
  left: -5.5px;
  top: 100px;
  width: 3px;
  height: 48px;
  background: #3a3d4c;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 60px 0 #3a3d4c, 0 115px 0 #3a3d4c;
}

.device-frame::after {
  content: "";
  position: absolute;
  right: -5.5px;
  top: 130px;
  width: 3px;
  height: 64px;
  background: #3a3d4c;
  border-radius: 0 3px 3px 0;
}

/* Inner Display Bezel */
.device-screen-wrapper {
  position: relative;
  border-radius: 46px;
  overflow: hidden;
  background-color: #000000;
  display: block;
  line-height: 0;
}

/* iPhone 18 Dynamic Island Pill */
.device-dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 20px;
  background-color: #000000;
  border-radius: 9999px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.08);
}

.device-dynamic-island::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1f2747 0%, #070a16 70%, #000000 100%);
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.3);
}

.device-screen-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 46px;
}

/* ==========================================================================
   DUAL FLOATING CARDS (OVERLAPPING iPHONE)
   1. TOP-RIGHT: 7 Дней Бесплатно (StoreKit Trial Window)
   2. BOTTOM-LEFT: Голос Мамы (Soundwave Window)
   ========================================================================== */
.floating-glass-card {
  position: absolute;
  background-color: var(--color-paper-3);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.65);
  z-index: 20;
}

/* TOP-RIGHT CARD: FREE TRIAL */
.floating-trial-card {
  top: 36px;
  right: -24px;
  width: 205px;
}

/* ONLY THE TITLE TEXT IS YELLOW */
.floating-trial-card .audio-card-title {
  color: #ffd15c;
  font-weight: 700;
}

/* BOTTOM-LEFT CARD: FAMILY VOICE */
.floating-audio-card {
  bottom: 24px;
  left: -22px;
  width: 215px;
}

/* ONLY THE TITLE TEXT IS YELLOW */
.floating-audio-card .audio-card-title {
  color: #ffd15c;
  font-weight: 700;
}

.card-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.15);
  border: 1px solid rgba(0, 113, 227, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.soundwave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  flex-shrink: 0;
}

.soundwave-bar {
  width: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.soundwave-bar:nth-child(1) { height: 6px; }
.soundwave-bar:nth-child(2) { height: 16px; }
.soundwave-bar:nth-child(3) { height: 10px; }
.soundwave-bar:nth-child(4) { height: 18px; }
.soundwave-bar:nth-child(5) { height: 8px; }

.audio-card-text {
  display: flex;
  flex-direction: column;
}

.audio-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-ink);
}

.audio-card-sub {
  font-size: 0.7rem;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

.footer-link:hover {
  color: var(--color-ink);
}

/* ==========================================================================
   MOBILE ADAPTATION:
   ========================================================================== */
@media (max-width: 860px) {
  .viewport-screen {
    min-height: auto;
    height: auto;
    padding: 16px 20px 32px;
    gap: 18px;
  }

  .nav-bar {
    padding-bottom: 10px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  /* REORDER: Phone on TOP, Copy BELOW */
  .hero-stage {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0 0;
  }

  .hero-visual {
    order: 1;
    margin: 8px auto 18px;
    width: 100%;
    max-width: 290px;
  }

  .device-frame {
    max-width: 285px;
    border-radius: 48px;
    padding: 3.5px;
  }

  .device-screen-wrapper {
    border-radius: 44px;
  }

  .device-screen-img {
    border-radius: 44px;
  }

  /* Dual Floating Cards on Mobile */
  .floating-trial-card {
    top: 24px;
    right: -10px;
    width: 195px;
    padding: 9px 12px;
  }

  .floating-audio-card {
    bottom: 20px;
    left: -10px;
    width: 205px;
    padding: 9px 13px;
  }

  .hero-copy {
    order: 2;
    gap: 14px;
  }

  .badge-tag {
    font-size: 0.78rem;
    padding: 5px 12px;
  }

  .hero-headline {
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .hero-sentence {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* 2x2 GRID FOR HALLMARK FEATURE CARDS ON MOBILE */
  .signature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
  }

  .feature-pill {
    padding: 10px 12px;
    border-radius: 14px;
    gap: 3px;
  }

  .feature-pill-top {
    gap: 6px;
  }

  .feature-pill-icon {
    width: 14px;
    height: 14px;
  }

  .feature-pill-title {
    font-size: 0.8rem;
  }

  .feature-pill-desc {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* Full tactile mobile buttons with 48px height */
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    height: 48px;
    min-height: 48px;
    border-radius: 14px;
    font-size: 0.96rem;
  }

  .footer-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding-top: 20px;
  }

  .footer-nav {
    justify-content: center;
    gap: 12px 16px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
