:root {
  --bg: #fff7fc;
  --surface: #ffffff;
  --ink: #1f1a24;
  --muted: #6f6378;
  --primary: #c84790;
  --primary-strong: #9f2f70;
  --line: #f0d6e7;
  --shadow: 0 10px 30px rgba(164, 74, 126, 0.12);
  --danger: #a1275c;
  --danger-bg: #ffe8f1;
  --ok: #1a7f4f;
  --ok-bg: #e9fbf1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', 'Avenir Next', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top right, #ffeefe, var(--bg) 55%);
  color: var(--ink);
  line-height: 1.5;
}

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

.container {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 252, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  font-weight: 800;
  color: var(--primary-strong);
  letter-spacing: 0.2px;
  font-size: 1.1rem;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid #e5bfd6;
  background: linear-gradient(180deg, #fff 0%, #fff2fb 100%);
  border-radius: 12px;
  padding: 0.62rem 0.95rem;
  font: inherit;
  font-weight: 700;
  color: var(--primary-strong);
  box-shadow: 0 6px 18px rgba(164, 74, 126, 0.16);
}

.nav {
  margin-left: auto;
}

.nav-links,
.primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
  font-size: 0.95rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a,
.primary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.66rem 1rem;
  border-radius: 999px;
  border: 1px solid #edd2e3;
  white-space: nowrap;
  background: #fff;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.primary-nav a:hover,
.primary-nav a:focus-visible {
  border-color: #dba0c3;
  background: #fff7fc;
}

.hero {
  padding: 3.5rem 0 2.2rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin: 0.25rem 0 0.75rem;
}

.hero p {
  max-width: 640px;
}

.eyebrow,
.subtle,
.field-help {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.2rem 0 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  border: 1px solid transparent;
  min-height: 44px;
  cursor: pointer;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

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

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.section-anchor {
  scroll-margin-top: 90px;
}

.how-it-works,
.cta-section,
.form-section {
  margin-bottom: 1.2rem;
}

.form-page {
  width: min(760px, 94vw);
  margin: 2rem auto 2.8rem;
}

.form-shell h1 {
  margin-top: 0;
}

.form-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 2vw, 2rem);
}

.profile-form {
  display: grid;
  gap: 1rem;
}

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

.form-field,
.field-group {
  display: grid;
  gap: 0.45rem;
}

.profile-form label,
.field-label {
  font-weight: 650;
  font-size: 0.96rem;
}

.input,
.textarea,
input[type='text'],
input[type='url'],
input[type='email'],
input[type='tel'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='file'],
select,
textarea,
.profile-form input,
.profile-form textarea,
.profile-form select {
  width: 100%;
  border: 1px solid #e3bad2;
  border-radius: 14px;
  padding: 0.86rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #fff8fd 100%);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input::placeholder,
.textarea::placeholder,
input::placeholder,
textarea::placeholder,
.profile-form input::placeholder,
.profile-form textarea::placeholder {
  color: #9f8394;
}

.input[type='file'],
.profile-form input[type='file'],
input[type='file'],
.profile-form input:focus,
.profile-form textarea:focus,
.profile-form select:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #cf6da4;
  background: #fff;
  box-shadow: 0 0 0 4px #f8d8ea;
}

.textarea,
.profile-form textarea {
  min-height: 130px;
  resize: vertical;
}

.field-help {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
}

.inline-two {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-card {
  border: 1px dashed #dba0c3;
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #fff7fc 100%);
}

.preview-box {
  border-radius: 12px;
  border: 1px solid #f0d6e7;
  background: #fff9fd;
  padding: 0.8rem;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
}

#create-buddylink .profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#create-buddylink .profile-form .btn {
  width: auto;
}

#create-buddylink .profile-form label,
#create-buddylink .profile-form input,
#create-buddylink .profile-form textarea {
  grid-column: 1 / -1;
}

.upload-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.preview-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.primary-button,
.secondary-button {
  min-height: 46px;
}

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

.secondary-button,
.btn-secondary {
  border-color: var(--line);
  background: #fff;
}

.result-card {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid #c9efd8;
  background: var(--ok-bg);
}

.status-text,
.error-text {
  margin: 0;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.error-text {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #f8c9db;
}

.status-text {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid #c9efd8;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

/* Profile pages */
.profile-shell {
  width: min(720px, 94vw);
  margin: 1.2rem auto 2.5rem;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  gap: 0.65rem;
}

.stack .btn {
  width: 100%;
}

.section-title {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.not-found {
  width: min(700px, 92vw);
  margin: 18vh auto;
  text-align: center;
}

@media (max-width: 820px) {
  .site-header {
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
  }

  .nav-links,
  .primary-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.45rem;
    padding-top: 0.2rem;
  }

  .nav-links a,
  .primary-nav a {
    padding: 0.58rem 0.8rem;
  }

  .inline-two {
    grid-template-columns: 1fr;
  }

  #create-buddylink .profile-form {
    grid-template-columns: 1fr;
  }

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

  .link-row {
    grid-template-columns: 1fr;
  }

  .btn,
  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
