:root {
  --paper: #f7f3ec;
  --surface: #ffffff;
  --surface-soft: #eef7f5;
  --text: #1f2a2d;
  --muted: #5d696d;
  --line: #d9dedb;
  --green: #0d7868;
  --green-dark: #07584d;
  --red: #b9362f;
  --amber: #d99a2b;
  --blue: #1e5d86;
  --shadow: 0 18px 44px rgba(31, 42, 45, 0.12);
}

* {
  box-sizing: border-box;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 0 clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(31, 42, 45, 0.88);
  color: #fff;
  backdrop-filter: blur(16px);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  min-width: 0;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: contain;
}

nav {
  gap: clamp(10px, 3vw, 26px);
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
}

nav a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

nav a:hover {
  color: #fff;
}

.hero {
  position: relative;
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(15, 31, 34, 0.92) 0%, rgba(15, 31, 34, 0.72) 43%, rgba(15, 31, 34, 0.12) 100%),
    linear-gradient(0deg, rgba(15, 31, 34, 0.45), rgba(15, 31, 34, 0));
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/medical-response-hero.png?v=20260627071635");
  background-size: cover;
  background-position: center right;
}

.hero-content {
  width: min(780px, calc(100% - 32px));
  margin-left: clamp(16px, 6vw, 84px);
  padding: 70px 0 104px;
  color: #fff;
}

.hero-logo {
  display: block;
  width: clamp(96px, 13vw, 150px);
  height: clamp(96px, 13vw, 150px);
  margin: 0 0 22px;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  object-fit: contain;
}

.hero-actions + .hero-logo {
  margin-top: 28px;
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a9e6dc;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.hero-copy {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.hero-actions,
.recorder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

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

.primary:hover {
  background: var(--green-dark);
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.54);
  color: #fff;
}

.alert-band {
  padding: 16px clamp(16px, 6vw, 84px);
  background: #fff3d8;
  color: #3c3120;
  line-height: 1.5;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.intro {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 36px;
}

.steps,
.doctor-grid,
.emergency-grid,
.rescue-grid {
  display: grid;
  gap: 16px;
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps article,
.doctor-card,
.form-panel,
.guidance-panel,
.emergency-grid a,
.rescue-grid article,
.contact-section > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps article {
  padding: 22px;
}

.steps span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--green-dark);
  font-weight: 800;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.doctor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doctor-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.doctor-card.selected {
  border-color: var(--green);
  outline: 3px solid rgba(13, 120, 104, 0.16);
}

.doctor-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.doctor-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e7f2ef;
  color: var(--green-dark);
  font-weight: 900;
}

.specialty {
  color: var(--blue);
  font-weight: 800;
}

.meta-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.45;
}

.doctor-card button {
  width: 100%;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.specialist-section {
  background: #eaf4f1;
  box-shadow: 0 0 0 100vmax #eaf4f1;
  clip-path: inset(0 -100vmax);
  padding-top: 64px;
  padding-bottom: 82px;
}

.consultation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.form-panel,
.guidance-panel {
  padding: clamp(20px, 4vw, 34px);
}

form,
.field-grid {
  display: grid;
  gap: 16px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label,
legend {
  color: var(--text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

input,
select {
  min-height: 48px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 1fr);
  gap: 8px;
}

.phone-row select,
.phone-row input {
  min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(13, 120, 104, 0.18);
  border-color: var(--green);
}

.voice-note {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.icon-button {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
}

.icon-button span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}

.icon-button.recording span {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.voice-note p {
  margin-bottom: 0;
}

.download-link {
  color: var(--green-dark);
  font-weight: 800;
}

.consent-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.consent-row label {
  font-weight: 600;
  line-height: 1.45;
}

.submit-button {
  width: fit-content;
}

.form-note {
  min-height: 24px;
  margin: -4px 0 0;
  color: var(--green-dark);
  font-weight: 800;
}

.guidance-panel {
  position: sticky;
  top: 92px;
  background: #fdfbf6;
}

.guidance-panel ul {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.emergency {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 28px;
  align-items: start;
}

.emergency-list {
  display: grid;
  gap: 18px;
}

.emergency-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.emergency-grid a {
  display: grid;
  gap: 10px;
  min-height: 124px;
  padding: 20px;
  text-decoration: none;
}

.emergency-grid span {
  color: var(--muted);
  font-weight: 800;
}

.emergency-grid strong {
  color: var(--red);
  font-size: 28px;
  line-height: 1.05;
}

.rescue-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rescue-grid article {
  padding: 18px;
}

.rescue-grid h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.rescue-grid p {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 800;
}

.contact-section {
  padding-top: 0;
}

.contact-section > div {
  padding: clamp(22px, 4vw, 34px);
  background: #12336b;
  color: #fff;
}

.contact-section .eyebrow {
  color: #ffd35a;
}

.contact-section p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
}

.contact-section a {
  color: #ffd35a;
  font-weight: 900;
}

.site-footer {
  padding: 28px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 800;
}

@media (max-width: 920px) {
  .intro,
  .section-head,
  .consultation,
  .emergency {
    grid-template-columns: 1fr;
  }

  .steps,
  .doctor-grid,
  .emergency-grid,
  .rescue-grid {
    grid-template-columns: 1fr;
  }

  .guidance-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 14px 16px;
  }

  .brand {
    width: 100%;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hero {
    min-height: auto;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(15, 31, 34, 0.94), rgba(15, 31, 34, 0.62));
  }

  .hero-content {
    width: min(100% - 32px, 780px);
    margin: 0 auto;
    padding: 40px 0 64px;
  }

  .hero-logo {
    width: 104px;
    height: 104px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .phone-row {
    grid-template-columns: 1fr;
  }

  .submit-button,
  .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand span:last-child {
    font-size: 14px;
  }

  nav {
    flex-wrap: wrap;
    font-size: 13px;
  }

  nav a {
    flex: 1 1 auto;
    min-width: max-content;
  }

  h1 {
    font-size: 38px;
  }

  .hero-logo {
    width: 88px;
    height: 88px;
  }

  .section {
    width: min(100% - 24px, 1120px);
    padding: 54px 0;
  }

  .form-panel,
  .guidance-panel {
    padding: 18px;
  }
}
