:root {
  --bg: #f7f4ef;
  --ink: #1a1614;
  --muted: #5e564e;
  --line: #e6dfd6;
  --red: #e12630;
  --red-deep: #c01c25;
  --green: #127a45;
  --green-deep: #0d5e35;
  --sans: "Outfit", "Noto Sans Sinhala", "Iskoola Pota", "Nirmala UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 55% 42% at 50% 0%, rgba(225, 38, 48, 0.07), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.7rem 1rem;
  z-index: 5;
}

.skip:focus {
  top: 1rem;
}

main {
  width: min(720px, calc(100% - 2.5rem));
  margin: auto;
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.mark {
  width: auto;
  height: 148px;
  margin: 0 auto 0.85rem;
}

.brand {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
}

.brand::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin: 0.95rem auto 0;
  background: var(--red);
}

.badge {
  display: inline-block;
  margin: 1.35rem 0 0.85rem;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}

.lead {
  margin: 1.15rem auto 0.3rem;
  max-width: 26rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.sinhala {
  margin: 0;
  font-family: "Noto Sans Sinhala", "Iskoola Pota", sans-serif;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--muted);
}

.note {
  margin: 1.15rem auto 0;
  max-width: 32rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.2rem;
  min-height: 52px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.btn-red {
  background: var(--red);
  color: white;
}

.btn-red:hover,
.btn-red:focus-visible {
  background: var(--red-deep);
}

.btn-green {
  background: var(--green);
  color: white;
}

.btn-green:hover,
.btn-green:focus-visible {
  background: var(--green-deep);
}

.btn-line {
  background: transparent;
  border-color: #d9d1c7;
  color: var(--ink);
}

.btn-line:hover,
.btn-line:focus-visible {
  border-color: var(--ink);
}

a:focus-visible {
  outline: 3px solid #e7b3b6;
  outline-offset: 3px;
}

footer {
  width: min(720px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 calc(1.6rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

footer p {
  margin: 0;
}

.links {
  display: flex;
  gap: 1rem;
}

.links a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.links a:hover,
.links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 700px) {
  body {
    font-size: 1.05rem;
  }

  main,
  footer {
    width: min(440px, calc(100% - 2rem));
  }

  .mark {
    height: 112px;
    margin-bottom: 0.45rem;
  }

  main {
    padding: 1.6rem 0 1.25rem;
  }

  .brand {
    letter-spacing: 0.18em;
  }

  .brand::after {
    margin-top: 0.7rem;
  }

  .badge {
    margin: 0.95rem 0 0.45rem;
  }

  h1 {
    font-size: clamp(2.35rem, 10vw, 2.85rem);
    line-height: 1.05;
  }

  h1 .line {
    display: block;
  }

  .lead {
    margin-top: 0.85rem;
    font-size: 1.12rem;
  }

  .note {
    margin-top: 0.75rem;
    font-size: 1.02rem;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.35rem;
  }

  .btn {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 0.45rem 1rem;
    font-size: 0.98rem;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding-bottom: calc(1.15rem + env(safe-area-inset-bottom));
    font-size: 0.95rem;
  }

  .links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
  }

  .links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 700px) and (max-height: 740px) {
  .mark {
    height: 72px;
    margin-bottom: 0.25rem;
  }

  main {
    padding: 0.55rem 0 0.35rem;
  }

  .brand::after {
    margin-top: 0.35rem;
  }

  .badge {
    margin: 0.4rem 0 0.15rem;
  }

  h1 {
    font-size: clamp(2rem, 8.6vw, 2.4rem);
  }

  .lead,
  .sinhala,
  .note {
    line-height: 1.35;
  }

  .lead {
    margin-top: 0.4rem;
    margin-bottom: 0.15rem;
    font-size: 1.02rem;
  }

  .sinhala {
    font-size: 1rem;
  }

  .note {
    margin-top: 0.35rem;
  }

  .actions {
    margin-top: 0.85rem;
    gap: 0.4rem;
  }

  .btn {
    min-height: 40px;
    padding: 0.35rem 0.85rem;
    font-size: 0.92rem;
  }

  footer {
    gap: 0;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom));
  }
}
