/* The Urdu School: styles and brand tokens.
   Follows design-reference/urdu-school-mobile-design.png (latest approved version).
   Mint and Berry are accents on white. Large fills are white, off-white or blush pink.
   Mobile-first. Breakpoints: 360px (hero side by side), 420px (learning boxes side by side),
   480px (two-column fields), 720px (tablet), 1024px (desktop).
   Website font: Inter, self-hosted (see css/fonts.css). */

:root {
  --color-berry: #8F2E5A;
  --color-berry-dark: #722348;
  --color-pink: #F39DB4;
  --color-blush: #FDF0F5;
  --color-blush-strong: #F9DCE7;
  --color-blush-border: #F2D3DF;
  --color-mint: #64CDB9;
  --color-mint-soft: #DDF3EC;
  --color-forest: #276F65;
  --color-mint-light: #EAF8F3;
  --color-off-white: #F8F8F6;
  --color-white: #FFFFFF;
  --color-line: #ECEEEC;
  --color-input-border: #CFDCD8;

  --color-text: var(--color-forest);
  --color-heading: var(--color-berry);

  --font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(39, 111, 101, 0.05), 0 6px 18px rgba(39, 111, 101, 0.07);
  --max-width: 1080px;
  --gutter: 16px;
  --touch-target: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-white);
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-forest);
}

h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-heading);
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-heading);
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--color-mint);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Icons: line icons, with mint accent circles where the design shows them */
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 20px 0;
}

.section--compact {
  padding: 8px 0;
}

.eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-forest);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 16px;
  background: var(--color-berry);
  color: var(--color-white);
  border-radius: var(--radius-pill);
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-target);
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--primary {
  background: var(--color-berry);
  color: var(--color-white);
}

.button--primary:hover {
  background: var(--color-berry-dark);
}

.button--outline {
  background: var(--color-white);
  border-color: var(--color-berry);
  color: var(--color-berry);
}

.button--outline:hover:not(:disabled) {
  background: var(--color-blush);
}

.button--text {
  min-height: 44px;
  padding: 8px 12px;
  background: transparent;
  color: var(--color-berry);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button--small {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 0.9rem;
}

.button--block {
  width: 100%;
}

/* Header: slim, white, logo and Register only */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
}

.site-header__logo img {
  width: 170px;
}

/* Slightly smaller button on phones, to balance the larger logo */
.site-header .button--small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Hero: text on the left, photo bleeding off the right edge */
.hero {
  padding: 20px 0 8px;
  background: var(--color-white);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Phones: headline and text first, full-width photograph below */
.hero h1 {
  font-size: 2rem;
  line-height: 1.15;
}

.hero__subtitle {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-forest);
}

.accent {
  color: var(--color-berry);
}

.hero__photo {
  margin: 0;
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 350 / 236;
  object-fit: cover;
  border-radius: 20px;
}

/* Phones: the course card sits slightly over the bottom of the photograph */
#course {
  position: relative;
  z-index: 1;
  margin-top: -14px;
  padding-top: 0;
}

/* Foundations 1.0: white card, thin dividers, mint icon accents */
.course-card {
  padding: 20px 16px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.course-card h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.details {
  margin: 0;
}

.details__row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--color-line);
}

.details__row:first-child {
  border-top: 0;
}

.details dt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-forest);
}

.details dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text);
}

/* Small mint circle behind each course icon */
.details dt .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  background: var(--color-mint-soft);
  color: var(--color-forest);
}

.times__item {
  display: block;
}

.times__item + .times__item {
  margin-top: 6px;
}

.times__item strong {
  display: block;
  color: var(--color-heading);
  font-weight: 700;
  white-space: nowrap;
}

.limited {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 11px 14px;
  background: var(--color-blush);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--color-berry);
}

.limited strong {
  font-weight: 700;
}

.limited .icon {
  color: var(--color-berry);
}

/* Learning boxes: soft off-white cards, icons in mint circles */
#learn-title {
  font-size: 1.2rem;
  margin: 0 0 12px;
  color: var(--color-forest);
}

.learn-grid {
  display: grid;
  gap: 10px;
}

.learn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--color-off-white);
  border-radius: 14px;
}

.learn-card .icon {
  width: 52px;
  height: 52px;
  padding: 14px;
  border-radius: 50%;
  background: var(--color-mint-soft);
  color: var(--color-forest);
  stroke-width: 1.6;
}

.learn-card h3 {
  margin: 0 0 2px;
  color: var(--color-forest);
  font-size: 0.98rem;
}

.learn-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--color-forest);
}

/* More Than Just a Five-Week Course: blush panel with a thin divider */
.progress-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--color-blush);
  border-radius: var(--radius);
}

.progress-card > .icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: 50%;
  background: var(--color-blush-strong);
  color: var(--color-berry);
  stroke-width: 1.6;
}

.progress-card > div {
  padding-left: 14px;
  border-left: 1px solid var(--color-blush-border);
}

.progress-card h2 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.progress-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-forest);
}

/* Registration: pale pink surround, white form cards */
.register {
  padding: 24px 0 32px;
  background: linear-gradient(180deg, #FDF2F6 0%, #FDF6F9 100%);
}

.register__inner {
  max-width: 760px;
}

.register h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
  color: var(--color-berry);
}

.register__intro {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--color-forest);
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 0 16px;
  background: var(--color-blush-strong);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-berry);
}

.notice .icon {
  color: var(--color-berry);
}

.form {
  display: grid;
  gap: 12px;
}

/* Each section is its own white card */
/* No border on the fieldset: a browser draws a legend across its top border, so the card is shaped by its
   background, shadow and radius instead. */
.form__section {
  margin: 0;
  padding: 14px;
  background: var(--color-white);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

.form legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-berry);
}

/* Visible section heading inside the card, used where the legend is hidden for screen readers. */
.form__heading {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-berry);
}

.form__grid {
  display: grid;
  gap: 10px;
}

.children {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

/* Fields */
.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--color-forest);
  overflow-wrap: anywhere;
}

/* One input height and radius for every field. 44px is the minimum touch target. */
.field input:not([type="checkbox"]),
.field select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-input-border);
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--color-forest) 50%),
    linear-gradient(135deg, var(--color-forest) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field input:not([type="checkbox"]):focus,
.field select:focus {
  outline: 3px solid var(--color-mint);
  outline-offset: 1px;
  border-color: var(--color-forest);
}

.field__hint {
  display: block;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
  color: var(--color-forest);
}

.field__error {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  font-weight: 700;
  color: var(--color-berry);
}

.field__error:empty {
  display: none;
}

.field--invalid input:not([type="checkbox"]),
.field--invalid select {
  border-color: var(--color-berry);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.check input {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--color-berry);
}

.check label {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-forest);
  overflow-wrap: anywhere;
}

.check label u {
  text-decoration-thickness: 1px;
}

/* Child cards */
.child-card {
  padding: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-blush-border);
  border-radius: 14px;
}

.child-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.child-card__title {
  margin: 0;
  font-size: 1rem;
  color: var(--color-berry);
}

.child-card__class,
.child-card__warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

.child-card__class {
  background: var(--color-mint-light);
  color: var(--color-forest);
}

.child-card__warning {
  background: var(--color-blush);
  color: var(--color-berry);
  font-weight: 600;
}

.form__status {
  margin: 4px 0 0;
  font-weight: 700;
  color: var(--color-berry);
}

/* Footer */
.site-footer {
  padding: 22px 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-line);
  font-size: 0.88rem;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer img {
  width: 40px;
  height: 40px;
}

.site-footer p {
  margin: 0;
}

/* Hero side by side from 600px up */
@media (min-width: 600px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 28px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  #course {
    margin-top: 0;
    padding-top: 28px;
  }

  .hero__photo img {
    aspect-ratio: auto;
    height: 260px;
  }
}

@media (min-width: 420px) {
  .learn-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .learn-card {
    flex-direction: column;
    text-align: center;
    padding: 16px 10px;
  }
}

@media (min-width: 480px) {
  .form__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form__grid .field--full {
    grid-column: 1 / -1;
  }
}

/* Tablet and up */
@media (min-width: 720px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.7rem; }
  .register h2 { font-size: 1.9rem; }

  .section {
    padding: 32px 0;
  }

  .section--compact {
    padding: 12px 0;
  }

  .site-header__logo img {
    width: 185px;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .course-card {
    padding: 26px 28px 22px;
  }

  .course-card h2 {
    font-size: 1.6rem;
  }

  .details__row {
    grid-template-columns: 220px 1fr;
    padding: 14px 0;
  }

  .details dt,
  .details dd {
    font-size: 1rem;
  }

  .times__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    max-width: 380px;
  }

  .times__item + .times__item {
    margin-top: 4px;
  }

  .learn-card {
    padding: 22px 14px;
  }

  .learn-card h3 {
    font-size: 1.1rem;
  }

  .learn-card p {
    font-size: 0.95rem;
  }

  .form__section {
    padding: 22px;
  }

  .child-card {
    padding: 18px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  h1 { font-size: 3rem; }

  .site-header__inner {
    min-height: 88px;
  }

  .site-header__logo img {
    width: 200px;
  }

  /* Editorial hero: photograph as the background, fading into white on the left */
  .hero {
    position: relative;
    min-height: 600px;
    padding: 0;
  }

  .hero__grid {
    display: block;
    padding-top: 56px;
  }

  .hero__text {
    max-width: 50%;
  }

  .hero h1 {
    font-size: clamp(3rem, 4.6vw, 4.4rem);
  }

  .hero__subtitle {
    max-width: 28rem;
    font-size: 1.2rem;
  }

  .hero__photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56%;
    margin: 0;
  }

  .hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 50%;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
  }

  /* The course card overlaps the bottom of the hero */
  #course {
    position: relative;
    z-index: 2;
    margin-top: -150px;
    padding-top: 0;
  }

  .learn-card p {
    font-size: 1rem;
  }

  /* Foundations 1.0 on desktop: five columns, thin dividers, icon above each value */
  .course-card {
    padding: 28px 36px 24px;
    box-shadow: 0 18px 40px rgba(39, 111, 101, 0.10);
  }

  .details {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  #course .container {
    max-width: 1180px;
  }

  .details__row {
    display: block;
    padding: 6px 14px;
    border-top: 0;
    border-left: 1px solid var(--color-line);
  }

  .times__item {
    display: block;
    max-width: none;
  }

  .times__item > span {
    white-space: nowrap;
  }

  .details__row:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .details dd {
    margin-top: 6px;
    padding-left: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
