:root {
  --enamel: #0f1b36;
  --enamel-deep: #0b1529;
  --panel: #172645;
  --parchment: #efe7d4;
  --mist: #a9b3c7;
  --brass: #d2a64e;
  --saffron: #ec8e3a;
  --teal: #35b9c2;
  --violet: #8c7bff;
  --rule: rgba(239, 231, 212, 0.14);
  --device: #05070d;

  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gurmukhi: "Mukta Mahee", "Gurmukhi MN", "Noto Sans Gurmukhi", Raavi, sans-serif;
  --shahmukhi: "Noto Nastaliq Urdu", "Geeza Pro", "Noto Naskh Arabic", serif;

  --measure: 62ch;
  --page: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--enamel);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--parchment);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--brass);
  color: var(--enamel);
  border-radius: 6px;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header and footer */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--parchment);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--mist);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--parchment);
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--enamel-deep);
  color: var(--mist);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--mist);
}

/* Devices: real app captures in a dark frame with a brass edge, as in the App Store screenshots */

.phone,
.tablet {
  margin: 0;
  background: var(--device);
  box-shadow: 0 0 0 1.5px rgba(210, 166, 78, 0.7), 0 30px 60px rgba(0, 0, 0, 0.45);
}

.phone {
  width: var(--phone-w, 300px);
  padding: 8px;
  border-radius: 46px;
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 38px;
}

.tablet {
  width: var(--tablet-w, 520px);
  padding: 12px;
  border-radius: 30px;
}

.tablet img {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

/* Home: hero */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--section);
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.25rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-size: 1.1875rem;
  max-width: 36ch;
}

.availability {
  display: inline-block;
  margin: 1.25rem 0 0.75rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(210, 166, 78, 0.6);
  border-radius: 999px;
  color: var(--parchment);
  font-weight: 600;
}

.requirements {
  color: var(--mist);
  font-size: 0.9375rem;
  margin: 0;
}

.hero-devices {
  position: relative;
  height: 700px;
}

.hero-devices .phone {
  position: absolute;
}

.hero-devices .phone-front {
  --phone-w: 300px;
  left: 2%;
  top: 40px;
  z-index: 2;
}

.hero-devices .phone-back {
  --phone-w: 262px;
  right: 2%;
  top: 0;
}

/* Home: three calendars */

.reckonings {
  background: var(--enamel-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.reckonings .wrap,
.also .wrap,
.faq .wrap {
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-intro {
  color: var(--mist);
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.reckoning-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin: 0;
}

.reckoning {
  border-top: 3px solid var(--season, var(--brass));
  padding-top: 1.25rem;
}

.reckoning dt {
  color: var(--mist);
  font-size: 0.9375rem;
}

.reckoning dd {
  margin: 0;
}

.reckoning .date {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0.35rem 0 0.75rem;
}

.reckoning .rule {
  display: block;
  color: var(--mist);
  font-size: 0.9375rem;
}

/* Home: feature rows */

.feature .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: var(--section);
  padding-bottom: 0;
}

.feature-text {
  max-width: 30rem;
}

.feature-text h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.feature-text p {
  color: var(--mist);
}

.feature-figure {
  display: flex;
  justify-content: center;
}

.feature-figure .phone {
  --phone-w: clamp(240px, 24vw, 290px);
}

.feature.reverse .feature-figure {
  order: -1;
}

.scripts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.75rem;
  margin: 1.5rem 0 0;
  font-size: 2rem;
  color: var(--parchment);
}

.scripts [lang="pa-Guru"] {
  font-family: var(--gurmukhi);
}

.scripts [lang="pnb-Arab"] {
  font-family: var(--shahmukhi);
}

.scripts [lang="en"] {
  font-family: var(--serif);
}

/* Home: eight pehars dial */

.dial {
  margin: 0;
  width: 100%;
}

.dial svg {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  overflow: visible;
}

.dial-track {
  fill: none;
  stroke: var(--rule);
  stroke-width: 22;
}

.dial-arc {
  fill: none;
  stroke-width: 20;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.dial-arc.day {
  stroke: var(--brass);
  opacity: 0.55;
}

.dial-arc.night {
  stroke: var(--violet);
  opacity: 0.5;
}

.dial-arc.current {
  stroke: var(--saffron);
  stroke-width: 26;
  opacity: 1;
}

.dial-tick {
  stroke: var(--parchment);
  stroke-width: 1.5;
  opacity: 0.6;
}

.dial-now {
  fill: var(--enamel);
  stroke: var(--parchment);
  stroke-width: 3;
}

.dial-label {
  fill: var(--mist);
  font-family: var(--sans);
  font-size: 13px;
}

.dial-day {
  fill: var(--parchment);
  font-family: var(--serif);
  font-size: 88px;
  font-weight: 300;
}

.dial-month {
  fill: var(--parchment);
  font-family: var(--serif);
  font-size: 26px;
}

.dial-year {
  fill: var(--mist);
  font-family: var(--sans);
  font-size: 14px;
}

.dial figcaption {
  max-width: 40ch;
  margin: 1.25rem auto 0;
  color: var(--mist);
  font-size: 0.9375rem;
  text-align: center;
}

/* site.js arms the dial only when motion is allowed, then draws it once it scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .dial.is-armed .dial-arc {
    stroke-dashoffset: 1;
  }

  .dial.is-armed.is-drawn .dial-arc {
    animation: draw-pehar 0.7s cubic-bezier(0.3, 0.6, 0.3, 1) both;
    animation-delay: calc(var(--i) * 0.12s);
  }

  @keyframes draw-pehar {
    from {
      stroke-dashoffset: 1;
    }
    to {
      stroke-dashoffset: 0;
    }
  }
}

/* Home: iPad and iPhone Duo */

.devices .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.devices .tablet {
  --tablet-w: min(100%, 540px);
  justify-self: center;
}

/* Home: also in TrueCalendar */

.also {
  background: var(--enamel-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.also-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: 2.25rem;
  margin-top: 2rem;
}

.also-grid p {
  color: var(--mist);
  margin: 0;
  max-width: 46ch;
}

/* Home: privacy promise */

.promise .wrap {
  padding-top: var(--section);
  padding-bottom: 0;
}

.promise p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  line-height: 1.3;
  max-width: 30ch;
  margin: 0 0 1rem;
}

/* Home: questions */

.faq-list {
  max-width: 46rem;
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid var(--brass);
  border-bottom: 1.5px solid var(--brass);
  transform: rotate(45deg) translateY(-25%);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translateY(-25%);
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}

.faq details p {
  color: var(--mist);
  margin: 0 0 1.25rem;
  max-width: var(--measure);
}

/* Home: closing */

.closing {
  border-top: 1px solid var(--rule);
}

.closing .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.closing img {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  margin-bottom: 1.75rem;
}

.closing h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 0.75rem;
}

.closing p {
  color: var(--mist);
  max-width: 44ch;
}

/* Text pages: privacy and support */

.doc .wrap {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.doc article {
  max-width: var(--measure);
}

.doc h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin-bottom: 0.75rem;
}

.doc h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 0.75rem;
}

.doc h3 {
  margin-top: 1.75rem;
}

.doc .meta {
  color: var(--mist);
  margin-bottom: 2rem;
}

.doc ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.doc li {
  margin-bottom: 0.35rem;
}

.contact {
  font-size: 1.25rem;
}

/* Small screens */

@media (max-width: 860px) {
  .hero .wrap,
  .feature .wrap,
  .devices .wrap {
    grid-template-columns: 1fr;
  }

  .hero-lede {
    max-width: none;
  }

  .hero-devices {
    height: 560px;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-devices .phone-front {
    --phone-w: 240px;
    left: 0;
  }

  .hero-devices .phone-back {
    --phone-w: 210px;
    right: 0;
  }

  .feature.reverse .feature-figure {
    order: 0;
  }

  .feature-text {
    max-width: none;
  }

  .reckoning-list,
  .also-grid {
    grid-template-columns: 1fr;
  }

  .reckoning-list {
    gap: 2rem;
  }

  .dial svg {
    max-width: 380px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 1rem;
  }

  .brand span {
    font-size: 1.125rem;
  }

  .hero-devices {
    height: 470px;
  }

  .hero-devices .phone-front {
    --phone-w: 200px;
  }

  .hero-devices .phone-back {
    --phone-w: 176px;
  }

  .feature-figure .phone {
    --phone-w: 230px;
  }
}
