:root {
  --accent:#0b63d6;
  --muted:#666;
  --card:#fff;
  --bg:#f4f7fb;
  --radius:12px;
  --pad:14px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ========== Global Reset & Layout ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;            /* Base for rem units */
}

body {
  margin: 0;
  background: var(--bg);
  color: #111;
  line-height: 1.45;
  padding: 1rem;              /* uniform padding on small screens */
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1rem;            /* side padding so nothing hugs the edge */
}

/* ========== Header ========== */
.page-header,
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  flex-wrap: wrap;
}

header h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);  /* scales with screen */
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* ========== Form Card ========== */
form.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(12,40,66,0.06);
  width: 100%;
}

/* ========== Grid System ========== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

/* On tablets & below, single column */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Form Controls ========== */
label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  word-wrap: break-word;     /* prevent overflow on long text */
}
label small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d8dde6;
  font-size: 0.9rem;
  background: #fff;
}

/* Let textareas grow but stay inside */
textarea {
  min-height: 6rem;
  resize: vertical;
}

/* ========== Photo Preview ========== */
.photo-preview {
  width: 100%;
  max-width: 150px;
  height: auto;
  aspect-ratio: 5 / 6;       /* keeps shape */
  border: 1px dashed #cbd6e8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Sections & Notes ========== */
.section-title {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.3;
}

/* ========== Buttons ========== */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

button {
  flex: 1 1 auto;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

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

button.ghost {
  background: transparent;
  border: 1px solid #cfd9ec;
  color: #0b2b5a;
}

/* ========== Small Screens Tweaks ========== */
@media (max-width: 600px) {
  body {
    padding: 0.75rem;
  }
  .actions {
    flex-direction: column;
  }
  .photo-preview {
    max-width: 120px;
    aspect-ratio: 4/5;
  }
}
