/* ============================================================
   PONCAKE FORMS — style.css
   Matches tutorials.poncake.dev aesthetic
   ============================================================ */

:root {
  --bg: #191a1f;
  --card: #22232a;
  --accent: #8a67f3;
  --text: #f2f2f2;
  --muted: #a0a3ad;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* ——————————————————————————————————————————
   NAV
—————————————————————————————————————————— */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #15161a;
  border-bottom: 1px solid #2b2d36;
}

.nav-inner {
  max-width: 1100px;
  margin: auto;
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav strong {
  font-size: 20px;
  margin-top: 14px;
  margin-bottom: 14px;
  color: var(--text);
  display: block;
}

.nav a {
  padding-left: 14px;
  padding-right: 14px;
  height: stretch;
  align-content: center;
  color: var(--muted);
  transition: background .2s ease, color .2s ease;
}

.nav a:hover {
  background: linear-gradient(135deg, #8a67f3, #6f4fe0);
  color: white;
}

.nav-links {
  display: flex;
  height: stretch;
}

/* ——————————————————————————————————————————
   CONTAINER
—————————————————————————————————————————— */

.container {
  max-width: 1100px;
  margin: 0 auto;
  margin-top: 40px;
  padding: 40px 24px 80px;
}

/* ——————————————————————————————————————————
   PAGE HEADER
—————————————————————————————————————————— */

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  /*font-size: 26px;*/
  margin-bottom: 6px;
}

.page-header p {
  color: var(--muted);
  font-size: 14px;
}

/* ——————————————————————————————————————————
   FORM INDEX CARDS
—————————————————————————————————————————— */

.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.form-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid transparent;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.form-card:hover {
  transform: translateY(-3px);
  border-color: rgba(138, 103, 243, .6);
  box-shadow: 0 8px 20px rgba(0,0,0,.3),
              0 0 0 1px rgba(138,103,243,.25);
  color: var(--text);
}

.form-card-icon {
  font-size: 26px;
  margin-bottom: 10px;
}

.form-card-tags {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid #2b2d36;
  padding: 2px 7px;
  border-radius: 4px;
}

.form-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-card-cta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
}

/* ——————————————————————————————————————————
   FORM PAGE LAYOUT
—————————————————————————————————————————— */

.form-wrap {
  max-width: 700px;
}

.form-section {
  background: var(--card);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 14px;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 6px;
  margin-top: -1px;
}


.form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2b2d36;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.req {
  color: var(--accent);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  background: #15161a;
  border: 1px solid #2b2d36;
  border-radius: 6px;
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  padding: 9px 12px;
  width: 100%;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder, textarea::placeholder {
  color: rgba(160,163,173,.4);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138,103,243,.15);
}

input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: #3a3c47;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a3ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.checkbox-option {
  margin-bottom: 16px;
}

/* ——————————————————————————————————————————
   CHECKBOXES
—————————————————————————————————————————— */

.checkbox-box {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2b2d36;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.checkbox-box:hover {
  background: #383a44;
}

input[type="checkbox"]:checked + .checkbox-box {
  background: var(--accent);
  color: white;
}

.checkbox-option input[type="checkbox"] {
  display: none;
}

.checkbox-label {
  font-weight: 400;
}

/* ——————————————————————————————————————————
   STAR RATING
—————————————————————————————————————————— */

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.star-rating input[type="radio"] { display: none; }

.star-rating label {
  font-size: 1.35rem;
  cursor: pointer;
  color: rgba(255,255,255,.12);
  transition: color .1s, transform .1s;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: #f5c840; }

.star-rating label:hover { transform: scale(1.1); }

/* ——————————————————————————————————————————
   RADIO PILLS
—————————————————————————————————————————— */

.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-option input[type="radio"] { display: none; }

.radio-option label {
  display: inline-block;
  padding: 7px 14px;
  background: #15161a;
  border: 1px solid #2b2d36;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  transition: all .15s;
}

.radio-option label:hover {
  border-color: #3a3c47;
  color: var(--text);
}

.radio-option input:checked + label {
  background: rgba(138,103,243,.12);
  border-color: rgba(138,103,243,.5);
  color: #c4adf8;
}

/* ——————————————————————————————————————————
   SUBMIT ROW
—————————————————————————————————————————— */

.form-section.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 340px;
}

.button {
  background: var(--accent);
  color: white;
  padding: 9px 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: system-ui, -apple-system, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.button .btn-text { position: relative; z-index: 1; }

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8a67f3, #6f4fe0);
  opacity: 0;
  transition: opacity .25s ease;
}

.button:hover::before { opacity: 1; }

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
  color: white;
}

.button:active { transform: translateY(0); }

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ——————————————————————————————————————————
   SCALE GROUP
—————————————————————————————————————————— */

.scale-group {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 6px;
}

.scale-group .radio-option {
  flex: 1;
}

.scale-group .radio-option label {
  width: 100%;
  text-align: center;
}

/* ——————————————————————————————————————————
   SUCCESS STATE
—————————————————————————————————————————— */

.success-state {
  display: none;
  background: var(--card);
  border-radius: 10px;
  padding: 60px 24px;
  text-align: center;
}

.success-icon { font-size: 40px; margin-bottom: 14px; }

.success-state h2 {
  font-size: 20px;
  color: #4ade80;
  margin-bottom: 8px;
}

.success-state p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ——————————————————————————————————————————
   RESPONSIVE
—————————————————————————————————————————— */

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }

  .form-section.submit-row {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .button { justify-content: center; }
}
