/* InstaSex — mobile-first, performance-oriented */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --text: #16181f;
  --muted: #5a6270;
  --line: #e2e5ec;
  --accent: #d81b60;
  --accent-hover: #ad1457;
  --accent-soft: rgba(216, 27, 96, 0.08);
  --shadow: 0 8px 32px rgba(22, 24, 31, 0.08);
  --radius: 12px;
  --radius-lg: 18px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle:hover {
  background: var(--accent-soft);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: flex;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-store {
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  background: var(--text);
  color: #fff;
}

.btn-store:hover {
  background: #333;
  color: #fff;
}

/* Main */
main#main {
  min-height: 50vh;
}

.section {
  padding-block: 3rem;
}

.section-tight {
  padding-block: 2rem;
}

.section-muted {
  background: #eceef3;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1,
.h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2,
.h2 {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  margin: 0 0 1rem;
  font-weight: 700;
}

h3,
.h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

.text-muted {
  color: var(--muted);
  margin: 0 0 1rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(22, 24, 31, 0.15) 0%,
    rgba(22, 24, 31, 0.75) 100%
  );
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  color: #fff;
}

.hero-inner .lead {
  color: rgba(255, 255, 255, 0.92);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero .btn-primary {
  background: #fff;
  color: var(--accent);
}

.hero .btn-primary:hover {
  background: #f8f8fa;
  color: var(--accent-hover);
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* Grid cards */
.grid-2 {
  display: grid;
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(22, 24, 31, 0.04);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.steps {
  counter-reset: step;
}

.step-card {
  position: relative;
  padding-left: 3rem;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reviews */
.review-grid {
  display: grid;
  gap: 1rem;
}

.review {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  align-items: start;
}

.review-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d81b60, #8e24aa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.stars {
  color: #f9a825;
  letter-spacing: 0.05em;
  margin: 0 0 0.35rem;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.rating-badge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

/* Blog cards */
.blog-grid {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card time {
  font-size: 0.8rem;
  color: var(--muted);
}

.blog-card h3 {
  margin: 0.35rem 0 0.5rem;
}

.blog-card p {
  flex: 1;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.blog-card a {
  font-weight: 600;
  text-decoration: none;
}

.blog-card a:hover {
  text-decoration: underline;
}

/* FAQ */
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.faq-list summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 600;
  list-style: none;
}

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

.faq-list summary::after {
  content: '+';
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list details div {
  padding: 0 1.1rem 1rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: #12141a;
  color: #c5c9d4;
  padding-block: 2.5rem 1rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-logo {
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  max-width: 32ch;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.social-link:hover {
  color: #ff80ab;
}

.footer-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b93a5;
  margin: 0 0 0.75rem;
}

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

.footer-links a {
  color: #e8eaf0;
  text-decoration: none;
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-links a:hover {
  color: #fff;
}

.footer-apps-label {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.8rem;
  color: #8b93a5;
}

.footer-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #2a2e38;
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #8b93a5;
}

.footer-bottom p {
  margin: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 0.75rem 0 0;
  font-size: 0.85rem;
}

.breadcrumbs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.breadcrumbs-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.35rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

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

/* Content article */
.article-body {
  max-width: 68ch;
}

.article-body h2 {
  margin-top: 2rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.article-html h2 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.article-html p {
  margin: 0 0 1rem;
  color: var(--muted);
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
  max-width: 480px;
}

.form label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--surface);
}

.form input:focus-visible,
.form textarea:focus-visible,
.form select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.form-msg.ok {
  background: #e8f5e9;
  color: #1b5e20;
}

.form-msg.err {
  background: #ffebee;
  color: #b71c1c;
}

/* Infographic */
.infographic {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.infographic-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.infographic-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.team-grid {
  display: grid;
  gap: 1.5rem;
}

.team-card {
  text-align: center;
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  background: linear-gradient(145deg, #3949ab, #d81b60);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.team-card a {
  font-weight: 600;
  text-decoration: none;
}

.team-card a:hover {
  text-decoration: underline;
}

/* Tablet */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem 1rem;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    flex: 1;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.15rem;
  }

  .nav-cta {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    margin-left: auto;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 1280px) {
  .section {
    padding-block: 4rem;
  }

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

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

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

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

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
