@import url("assets/brand/friends-design-tokens.css");

:root {
  --bg: #f6f3ec;
  --bg-alt: #fbf9f4;
  --surface: rgba(255, 253, 248, 0.82);
  --surface-solid: #fffdf8;
  --border: rgba(31, 26, 21, 0.1);
  --text: var(--friends-color-text-primary);
  --muted: var(--friends-color-text-secondary);
  --accent: var(--friends-color-accent);
  --accent-soft: rgba(242, 162, 58, 0.12);
  --shadow-soft: 0 24px 60px rgba(31, 26, 21, 0.08);
  --shadow-icon: 0 28px 56px rgba(31, 26, 21, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  font-family: var(--friends-font-sans);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.top-controls {
  display: flex;
  justify-content: flex-end;
}

.lang-switch {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(31, 26, 21, 0.04);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button.active {
  background: #2f241a;
  color: #fff;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: 20px 0 56px;
}

.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-soft);
}

.stage-stack {
  position: relative;
  height: 100%;
  min-height: 500px;
}

.stage-card {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 1px solid rgba(31, 26, 21, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.stage-card-back {
  transform: rotate(-6deg) scale(0.94);
  opacity: 0.46;
}

.stage-card-middle {
  transform: rotate(4deg) scale(0.97);
  opacity: 0.68;
}

.stage-card-front {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fffefb 0%, #f7f3ea 100%);
  box-shadow: 0 18px 40px rgba(31, 26, 21, 0.06);
}

.stage-screen {
  width: min(78%, 320px);
  aspect-ratio: 10 / 19;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fbf9f4 0%, #f2ede3 100%);
  border: 1px solid rgba(31, 26, 21, 0.06);
  display: grid;
  grid-template-rows: 54px 1fr auto auto;
  gap: 14px;
}

.stage-shape,
.stage-row {
  border-radius: 16px;
}

.stage-shape {
  background: rgba(31, 26, 21, 0.06);
}

.stage-shape-wide {
  width: 56%;
  height: 14px;
}

.stage-shape-tall {
  width: 100%;
  height: 100%;
  min-height: 220px;
}

.stage-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stage-shape-small {
  height: 74px;
}

.stage-shape-large {
  height: 112px;
}

.stage-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.stage-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 26, 21, 0.14);
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.app-icon-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  height: 156px;
  padding: 10px;
  border-radius: 36px;
  background: linear-gradient(180deg, #fffefb 0%, #f4eee4 100%);
  box-shadow: var(--shadow-icon);
}

.app-icon-shell img {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  display: block;
}

.hero-brand h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 560;
}

.content-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.content-section {
  margin-top: 20px;
  padding: 32px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.22rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
  font-weight: 540;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.faq-item p,
.subsection-copy {
  margin: 0;
}

.faq-item p,
.subsection-copy {
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.faq-item {
  padding: 18px 20px;
  border: 1px solid rgba(31, 26, 21, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.faq-item summary {
  position: relative;
  padding-right: 28px;
  list-style: none;
  cursor: pointer;
  font-weight: 540;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: rgba(31, 26, 21, 0.54);
  font-size: 1.2rem;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 14px;
}

.info-subsection {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(31, 26, 21, 0.08);
}

.subsection-title {
  margin: 0 0 12px;
  font-size: clamp(1.22rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
  font-weight: 540;
}

.inline-link {
  color: var(--friends-color-accent-text);
  font-weight: 560;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.placeholder-link {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 920px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding-top: 28px;
  }

  .hero-stage {
    min-height: 520px;
  }

}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 16px;
  }

  .hero-stage,
  .content-section {
    border-radius: 22px;
  }

  .hero-stage,
  .content-section {
    padding: 22px;
  }

  .hero-brand h1 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .app-icon-shell {
    width: 132px;
    height: 132px;
    border-radius: 30px;
  }

  .app-icon-shell img {
    border-radius: 24px;
  }

  .hero-stage {
    min-height: 460px;
  }

  .stage-stack {
    min-height: 360px;
  }
}
