/* =========================================================
   SURVEY / LANDING CSS (Godmother feedback)
   Palette: light #f7efef, accent #602541
   ========================================================= */

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

html, body { max-width: 100%; overflow-x: hidden; }

:root{
  /* Base / background */
  --bg-main: #f7efef;
  --bg-grad-2: #f5eded;
  --bg-grad-3: #f2eaea;

  --card: #ffffff;
  --card-soft: #fffdfd;

  /* Text */
  --text: #2a1f23;
  --muted: #7a6a70;

  /* Lines */
  --line: #e7dcdc;
  --line-strong: #d8c8cf;

  /* Accent */
  --accent: #602541;
  --accent-2: #7a3656;
  --accent-soft: #8a4a64;
  --accent-fade: #f1e6eb;

  /* States */
  --ok-bg: #eef6f2;
  --ok-border: #cfe6dc;
  --ok-text: #2f6b4f;

  --err-bg: #f9eeee;
  --err-border: #e7c9cf;
  --err-text: #7a2f3c;

  /* Effects */
  --shadow: 0 10px 24px rgba(96, 37, 65, 0.10);
  --shadow-2: 0 12px 30px rgba(96, 37, 65, 0.12);

  --radius: 18px;
  --radius-sm: 14px;

  /* Layout */
  --max: 820px;
}

/* Page */
body{
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-grad-2) 45%, var(--bg-grad-3) 100%);
}

/* Container */
.wrap{
  max-width: var(--max);
  margin: 24px auto;
  padding: 0 12px; /* smaller on mobile */
}
@media (min-width: 760px){
  .wrap{ padding: 0 18px; margin: 30px auto; }
}

/* Grid for cards */
.grid{
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

/* Card */
.card{
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: hidden; /* prevents child overflow */
}

/* Header style card */
.card.header{
  background: linear-gradient(135deg, rgba(96, 37, 65, 0.09), rgba(96, 37, 65, 0.04));
  border-color: var(--line);
}

/* Hero media card */
.heroMedia{
  padding: 0;
}
.heroMedia img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
}

/* Typography */
h1{
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--accent);
}
@media (min-width: 760px){
  h1{ font-size: 28px; }
}

h2{
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.sub{
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.muted{ color: var(--muted); }

/* Section header row */
.sectionTitle{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

/* Badge */
.badge{
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-fade);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Alerts */
.alert{
  margin-top: 14px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.alert.ok{
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}
.alert.err{
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-text);
}

/* Form layout */
.row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 760px){
  .row{ grid-template-columns: 1fr; }
}

label{
  display: block;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.hint{
  display: inline-block;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

/* Inputs */
input[type="text"],
textarea{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
}
textarea{
  min-height: 100px;
  resize: vertical;
}

input[type="text"]::placeholder,
textarea::placeholder{
  color: #9a8a90;
}

input[type="text"]:focus,
textarea:focus{
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(96, 37, 65, 0.15);
}

/* Required mark */
.req{
  color: var(--err-text);
  font-weight: 900;
  margin-left: 6px;
}

/* Rating tables: prevent overflow on small screens */
.tableWrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

/* Table */
.scaleTable{
  width: 100%;
  min-width: 560px; /* keeps 1..5 columns readable; scrolls on very small screens */
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.scaleTable th,
.scaleTable td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.scaleTable thead th{
  background: #faf7f8;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

.scaleTable tr:last-child td{
  border-bottom: none;
}

.qLabel{
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}

.radioCell{
  text-align: center;
  width: 56px;
}

.radioCell input{
  transform: scale(1.05);
  accent-color: var(--accent); /* modern browsers */
}

/* Legend */
.legend{
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 2px 0;
}

/* Thank you section link */
.thankyou{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.link{
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 900;
}
.link:hover{ text-decoration: underline; }

/* Buttons */
.btnbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
@media (max-width: 560px){
  .btnbar{
    flex-direction: column;
    align-items: stretch;
  }
}

.btn{
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
  background: var(--accent-fade);
  color: var(--accent);
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
}

.btn:hover{
  filter: brightness(0.98);
}
.btn:active{
  transform: translateY(1px);
}

.btn.primary{
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(96, 37, 65, 0.22);
}
.btn.primary:hover{
  box-shadow: 0 12px 24px rgba(96, 37, 65, 0.26);
}

/* Sticky submit card */
.stickySubmit{
  position: sticky;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-color: var(--line);
  box-shadow: var(--shadow-2);
}

/* Honeypot */
.hp{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Small polish: reduce huge tap highlights on mobile */
a, button, input, textarea{
  -webkit-tap-highlight-color: transparent;
}
