/* Tulpin VPN Landing - dark theme, mobile-first */

:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-input: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --danger: #f85149;
  --gradient-1: #4f46e5;
  --gradient-2: #06b6d4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, #0d1117 0%, #1a1f2e 50%, #21263a 100%);
  padding: 32px 0 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 60px;
  font-weight: 600;
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 28px;
  filter: drop-shadow(0 2px 8px rgba(255, 100, 100, 0.4));
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  filter: drop-shadow(0 2px 12px rgba(120, 80, 200, 0.5));
}

.hero h1 {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(120deg, #ffffff 0%, #c9d1d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.lead {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-dim);
  margin-bottom: 40px;
  max-width: 540px;
  position: relative;
  z-index: 1;
}

.lead-highlight {
  color: var(--text);
  font-weight: 700;
  background: linear-gradient(120deg, transparent 0%, transparent 8%, rgba(79, 70, 229, 0.25) 8%, rgba(79, 70, 229, 0.25) 92%, transparent 92%);
  padding: 0 2px;
}

.lead strong {
  color: var(--text);
  font-weight: 700;
}

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  padding: 16px 40px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 1;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* COMMON SECTIONS */
section {
  padding: 80px 0;
}

section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

/* HOW IT WORKS */
.how {
  background: var(--bg);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  border-radius: 50%;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-dim);
}

/* FORM */
.form-section {
  background: linear-gradient(180deg, var(--bg) 0%, #11161e 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.form-lead {
  color: var(--text-dim);
  margin-bottom: 24px;
  max-width: 540px;
}

#vpn-form {
  display: flex;
  gap: 12px;
  max-width: 540px;
  flex-wrap: wrap;
}

#vpn-form input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

#vpn-form input:focus {
  outline: none;
  border-color: var(--accent);
}

#vpn-form button {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

#vpn-form button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#vpn-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Support form (helpdesk) */
.support-section {
  background: linear-gradient(180deg, #11161e 0%, var(--bg) 100%);
}

#support-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
}

#support-form input,
#support-form textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

#support-form textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.4;
}

#support-form input:focus,
#support-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

#support-form button {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  font-family: inherit;
  align-self: flex-start;
}

#support-form button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#support-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  #support-form button { width: 100%; }
}

/* FAQ section */
.faq-section {
  background: var(--bg);
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-list {
  max-width: 740px;
  margin: 32px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: var(--accent);
}

.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  user-select: none;
  padding-right: 44px;
}

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

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s ease;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '\2212'; /* minus */
  transform: translateY(-50%) rotate(0deg);
}

.faq-body {
  padding: 0 20px 18px 20px;
  color: var(--text-dim);
  line-height: 1.55;
}

.faq-body p {
  margin: 8px 0;
}

.faq-body ol {
  margin: 8px 0 8px 20px;
  padding-left: 4px;
}

.faq-body li {
  margin: 6px 0;
}

.faq-body a {
  color: var(--accent);
}

.faq-body strong {
  color: var(--text);
}

/* RESULT */
.result {
  margin-top: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  padding: 24px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--success);
}

.sub-url-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sub-url {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SF Mono, Menlo, Monaco, "Cascadia Mono", monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--text);
}

.copy-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent-hover);
}

.copy-btn.copied {
  background: var(--success);
  color: white;
}

.hint {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.apps {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.apps h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text);
}

.app-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.app-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.app-btn:hover {
  border-color: var(--accent);
  background: var(--border);
}

.app-icon {
  font-size: 24px;
}

.app-text {
  display: flex;
  flex-direction: column;
}

.app-store {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-name {
  font-weight: 500;
  font-size: 14px;
}

.instructions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.instructions summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  user-select: none;
  padding: 4px 0;
}

.instructions ol {
  margin-top: 16px;
  padding-left: 24px;
  color: var(--text-dim);
}

.instructions li {
  margin-bottom: 8px;
}

.error {
  margin-top: 24px;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: var(--danger);
}

.next-steps {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.next-steps h4 {
  font-size: 17px;
  margin-bottom: 12px;
  color: var(--text);
}

.next-steps p {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.next-steps ul {
  padding-left: 20px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.next-steps li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.next-steps strong {
  color: var(--text);
  font-weight: 600;
}

.bot-btn-inline {
  display: inline-block;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin: 8px 0;
  transition: transform 0.15s ease;
}

.bot-btn-inline:hover {
  transform: translateY(-1px);
}

.hint-small {
  font-size: 13px;
  margin-top: 8px;
}

.hint-small a {
  color: var(--accent);
  text-decoration: none;
}

.hint-small a:hover {
  text-decoration: underline;
}

/* FEATURES */
.features {
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-highlight {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(6, 182, 212, 0.10));
  border-color: var(--accent);
}

.feature p strong {
  color: var(--text);
  font-weight: 700;
}

.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-dim);
  font-size: 15px;
}

/* CTA BOT */
.cta-bot {
  background: linear-gradient(135deg, #161b22 0%, #1a1f2e 100%);
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta-bot p {
  color: var(--text-dim);
  margin-bottom: 24px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.bot-btn {
  display: inline-block;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 14px 32px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  margin-bottom: 16px;
}

.bot-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.cta-bot .hint a {
  color: var(--accent);
  text-decoration: none;
}

.cta-bot .hint a:hover {
  text-decoration: underline;
}

/* FOOTER */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* iOS install banner */
.ios-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 24px;
  background: linear-gradient(135deg, #1a1f2e 0%, #21263a 100%);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(88, 166, 255, 0.2);
  z-index: 1000;
  animation: bannerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 480px;
  margin: 0 auto;
}

@keyframes bannerSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.ios-banner-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-family: inherit;
}

.ios-banner-close:hover {
  color: var(--text);
}

.ios-banner-content {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ios-banner-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 12px rgba(120, 80, 200, 0.5));
}

.ios-banner-text {
  flex: 1;
  min-width: 0;
}

.ios-banner-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text);
}

.ios-banner-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}

.ios-banner-desc strong {
  color: var(--text);
  font-weight: 600;
}

.ios-banner-arrow {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  color: var(--accent);
  animation: arrowBounce 1.2s ease-in-out infinite;
  text-shadow: 0 4px 16px rgba(88, 166, 255, 0.5);
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Mobile */
@media (max-width: 480px) {
  section { padding: 60px 0; }
  .hero { padding: 24px 0 60px; }
  .brand { margin-bottom: 40px; }
  .hero h1 { margin-bottom: 16px; }
  .lead { margin-bottom: 32px; }
  #vpn-form { flex-direction: column; }
  #vpn-form button { width: 100%; }
  .copy-btn { width: 100%; }
}
