/* =====================================
   BASE RESETS & TYPOGRAPHY
   ===================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.highlight {
  color: var(--color-accent);
  font-weight: 700;
}


a { 
  color: var(--color-primary); 
  text-decoration: none;
  transition: color .2s ease; }
  a:hover { color: var(--color-accent); 
}

ul, ol { 
  padding-left: 1.25rem; 
} /* keep sane defaults */

/* ======================================
   Global Form Styling 
   ====================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--color-border, #ddd);
  border-radius: 0.65rem;
  background: var(--color-white, #fff);
  color: var(--color-text, #222);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
  font-family: inherit;
  line-height: 1.5;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Focus effect --- */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent, #00b4aa);
  box-shadow: 0 0 0 4px rgba(0, 180, 170, 0.15);
  outline: none;
}

/* --- Labels --- */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-primary, #0c6f6d);
}

/* --- Small help text --- */
small,
.form-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted, #666);
  margin-top: 0.3rem;
}

/* --- Buttons --- */
button,
input[type="submit"] {
  display: inline-block;
  background: var(--color-primary, #0c6f6d);
  color: #fff;
  border: none;
  padding: 0.9rem 1.6rem;
  border-radius: 0.65rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

button:hover,
.btn:hover,
input[type="submit"]:hover {
  background: var(--color-accent, #00b4aa);
  transform: translateY(-2px);
}

/* --- Form group spacing --- */
fieldset {
  margin-bottom: 0.8rem;
  border: none;        /* removes that default browser box */
  padding: 0;          /* keeps it tight inside cards */
}

/* Add a little vertical rhythm between labels and inputs */
label + input,
label + select,
label + textarea {
  margin-top: 0.4rem;
}

/* Forms inside cards or panels */
form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

main form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* Buttons not stuck to the last field */
form button,
form .btn,
form input[type="submit"] {
  margin-top: 0.6rem;
  align-self: start; /* prevents full width buttons unless you want them */
}

/* Optional — if fields look too wide on small screens */
@media (max-width: 480px) {
  input,
  select,
  textarea {
    font-size: 0.95rem;
    padding: 0.8rem 0.9rem;
  }
}

.form-group--checkbox {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e0e0e0;
  font-size: 0.95rem;
}


.form-group--checkbox .checkbox {
  display: flex;
  align-items: flex-start; /* aligns checkbox with first line of text */
  gap: 0.6rem;
  cursor: pointer;
}

.form-group--checkbox input[type="checkbox"] {
  margin-top: 0.2rem; /* tiny nudge for optical alignment */
}

.form-group--checkbox label.checkbox {
  display: inline-flex;   /* NOT block */
  align-items: flex-start;
  width: auto;            /* break inherited 100% */
  max-width: 100%;
  gap: 0.6rem;
}

.form-group--checkbox input[type="checkbox"] {
  flex: 0 0 auto;   /* never stretch */
  width: auto;
  margin-top: 0.2rem;
}

.form-group--checkbox span {
  flex: 1 1 auto;
  line-height: 1.4;
}

.btn { display:inline-flex; align-items:center; gap:.5rem; }

.btn--primary { background: var(--color-primary); color:#fff; }
.btn--primary:hover { background: var(--color-accent); }

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid rgba(0,0,0,0.12);
}
.btn--ghost:hover{
  background: rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline: 3px solid rgba(225,0,106,0.35);
  outline-offset: 3px;
}

section h2{
  color: var(--color-primary);
}
section h2 .highlight{
  color: var(--color-accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}