/* Pono — website styles. No external fonts or scripts: the site makes no third-party requests. */

:root {
  /* Brand: the app's dusk background and the four phrase colors */
  --dusk-900: #161827;
  --dusk-800: #1e2133;
  --dusk-700: #282c43;
  --dusk-600: #353a57;

  --sorry: #4a5a8c;
  --love: #b85c70;
  --forgive: #457a70;
  --thanks: #ad7026;

  /* Brighter versions for text and small marks on dark backgrounds */
  --sorry-bright: #8f9fd6;
  --love-bright: #ee8fa1;
  --forgive-bright: #7fc4b4;
  --thanks-bright: #f0ad5c;

  --cream: #f6f1e7;
  --cream-deep: #ede5d6;
  --ink: #23263a;
  --ink-muted: #565a70;

  --on-dark: #f6f1e7;
  --on-dark-muted: rgba(246, 241, 231, 0.74);
  --on-dark-faint: rgba(246, 241, 231, 0.14);

  --font-serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;

  --radius: 20px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::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(--dusk-800);
  color: var(--on-dark);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(240, 173, 92, 0.35);
  color: inherit;
}

html {
  scrollbar-color: var(--dusk-600) var(--dusk-900);
  accent-color: var(--thanks-bright);
  caret-color: var(--thanks-bright);
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--thanks-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  background: var(--cream);
  color: var(--ink);
  padding: var(--space-1) var(--space-2);
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: var(--space-2);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(100% - 2 * var(--space-3), var(--max));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2 * var(--space-3), 720px);
  margin-inline: auto;
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.4rem;
}

p {
  margin: 0 0 var(--space-2);
  text-wrap: pretty;
}

.lead {
  font-size: 1.25rem;
  color: var(--on-dark-muted);
  max-width: 34em;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(30, 33, 51, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--on-dark-faint);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav ul {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--on-dark-muted);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}

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

@media (max-width: 640px) {
  .site-nav .optional {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease), border-color 200ms var(--ease);
}

.button svg {
  width: 20px;
  height: 20px;
}

.button-primary {
  background: var(--cream);
  color: var(--ink);
}

.button-primary:hover {
  background: #fffaf0;
  transform: translateY(-1px);
}

.button-ghost {
  color: var(--on-dark);
  border-color: rgba(246, 241, 231, 0.35);
}

.button-ghost:hover {
  border-color: var(--on-dark);
  transform: translateY(-1px);
}

.button[aria-disabled="true"] {
  cursor: default;
  transform: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.note {
  font-size: 0.9rem;
  color: var(--on-dark-muted);
  margin-top: var(--space-2);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-12) 0 var(--space-16);
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(184, 92, 112, 0.22), transparent 70%),
    radial-gradient(50% 45% at 10% 65%, rgba(69, 122, 112, 0.2), transparent 70%),
    linear-gradient(180deg, var(--dusk-700), var(--dusk-800));
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: var(--space-8);
}

@media (max-width: 880px) {
  .hero {
    padding-top: var(--space-8);
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero .lead {
    margin-inline: auto;
  }

  .hero .button-row {
    justify-content: center;
  }
}

.hero h1 em {
  font-style: normal;
  color: var(--thanks-bright);
}

/* ---------- Phone demo ---------- */

.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.phone {
  position: relative;
  width: min(290px, 78vw);
  aspect-ratio: 9 / 19;
  padding: 11px;
  border-radius: 48px;
  background: #0c0d16;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 36px 72px -24px rgba(0, 0, 0, 0.65);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 38px;
  overflow: hidden;
  background: var(--phrase-color, var(--sorry));
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background-color 900ms var(--ease);
  display: grid;
  place-items: center;
  padding: 0 var(--space-3);
}

.phone-screen::before {
  /* the Dynamic Island */
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 34%;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0c0d16;
}

.phone-settings {
  position: absolute;
  top: 48px;
  right: 18px;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.7);
}

.phone-phrase {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  line-height: 1.2;
  text-align: center;
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
}

.phone-phrase.is-leaving {
  opacity: 0;
  transform: scale(0.97);
}

.phone-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--on-dark-muted);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(246, 241, 231, 0.3);
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
  transition: border-color 200ms var(--ease);
}

.icon-button:hover {
  border-color: var(--on-dark);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

/* ---------- Sections ---------- */

.section {
  padding: var(--space-16) 0;
}

.section-paper {
  background: var(--cream);
  color: var(--ink);
}

.section-paper .lead,
.section-paper .muted {
  color: var(--ink-muted);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-8);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head.center .lead {
  margin-inline: auto;
}

/* ---------- The four phrases ---------- */

.phrases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

@media (max-width: 960px) {
  .phrases {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .phrases {
    grid-template-columns: 1fr;
  }
}

.phrase-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 85%, var(--dusk-900));
  color: #fff;
}

.phrase-card h3 {
  font-size: 1.9rem;
  font-weight: 300;
  margin-bottom: var(--space-3);
  min-height: 2.3em; /* two lines, so every card's label lines up */
}

@media (max-width: 520px) {
  .phrase-card {
    min-height: 0;
  }

  .phrase-card h3 {
    min-height: 0;
  }
}

.phrase-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
}

.phrase-card .label {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: #fff;
  margin-bottom: 4px;
}

.phrase-card.sorry { --card: var(--sorry); }
.phrase-card.love { --card: var(--love); }
.phrase-card.forgive { --card: var(--forgive); }
.phrase-card.thanks { --card: var(--thanks); }

/* ---------- Intention ---------- */

.intention {
  background:
    radial-gradient(45% 55% at 25% 50%, rgba(184, 92, 112, 0.16), transparent 70%),
    var(--dusk-800);
  padding-top: 0;
}

.intention-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: var(--space-12);
}

@media (max-width: 880px) {
  .intention-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.intention .lead {
  margin-bottom: var(--space-3);
}

.muted-on-dark {
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

.phone-static .phone-screen {
  --phrase-color: var(--love);
  cursor: default;
}

.phone-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* Matches the app: small sans capitals, lightly spaced, soft white */
.phone-intention {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.45;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  max-width: 15em;
}

/* An invisible copy below the phrase keeps the phrase centered, as in the app */
.phone-balance {
  visibility: hidden;
}

/* ---------- More than four phrases ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 880px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  border-left: 1px solid rgba(35, 38, 58, 0.18);
}

.steps li {
  position: relative;
  padding: 0 0 var(--space-3) var(--space-4);
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.55em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--step-color, var(--sorry));
}

.steps li:nth-child(4n + 1) { --step-color: var(--sorry); }
.steps li:nth-child(4n + 2) { --step-color: var(--love); }
.steps li:nth-child(4n + 3) { --step-color: var(--forgive); }
.steps li:nth-child(4n + 4) { --step-color: var(--thanks); }

.steps strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.steps span {
  color: var(--ink-muted);
}

.callout {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--cream-deep);
}

.callout h3 {
  margin-bottom: var(--space-2);
}

.callout p:last-child {
  margin-bottom: 0;
}

.source {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: var(--space-4);
}

/* ---------- Meaning of pono ---------- */

.definition {
  text-align: center;
  padding: var(--space-16) 0;
  background:
    radial-gradient(40% 60% at 50% 50%, rgba(173, 112, 38, 0.16), transparent 70%),
    var(--dusk-900);
}

.definition .word {
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 14vw, 9rem);
  font-weight: 300;
  line-height: 1;
  margin: 0;
}

.definition .pron {
  color: var(--on-dark-muted);
  margin: var(--space-2) 0 var(--space-6);
}

.meanings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 1.1em;
  list-style: none;
  padding: 0;
  margin: 0 auto var(--space-6);
  max-width: 760px;
}

.meanings li {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
}


.meanings li:nth-child(4n + 1) { color: var(--sorry-bright); }
.meanings li:nth-child(4n + 2) { color: var(--love-bright); }
.meanings li:nth-child(4n + 3) { color: var(--forgive-bright); }
.meanings li:nth-child(4n + 4) { color: var(--thanks-bright); }

.definition .lead {
  margin-inline: auto;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.feature {
  padding-top: var(--space-3);
  border-top: 1px solid var(--on-dark-faint);
}

.feature svg {
  width: 26px;
  height: 26px;
  margin-bottom: var(--space-2);
  color: var(--feature-color, var(--thanks-bright));
}

.feature:nth-child(4n + 1) { --feature-color: var(--sorry-bright); }
.feature:nth-child(4n + 2) { --feature-color: var(--love-bright); }
.feature:nth-child(4n + 3) { --feature-color: var(--forgive-bright); }
.feature:nth-child(4n + 4) { --feature-color: var(--thanks-bright); }

.feature h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-1);
}

.feature p {
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 1rem;
}

/* ---------- Closing CTA ---------- */

.cta {
  text-align: center;
  padding: var(--space-16) 0;
  background: linear-gradient(180deg, var(--dusk-800), var(--dusk-700));
}

.cta img {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  margin: 0 auto var(--space-4);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.6);
}

.cta .button-row {
  justify-content: center;
}

.cta .lead {
  margin-inline: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: var(--space-6) 0;
  background: var(--dusk-900);
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--on-dark);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
  display: flex;
  align-items: center;
}

/* ---------- Document pages (privacy, support) ---------- */

.doc-hero {
  padding: var(--space-12) 0 var(--space-8);
  background: linear-gradient(180deg, var(--dusk-700), var(--dusk-800));
}

.doc-hero .lead {
  margin: 0;
}

.doc {
  background: var(--cream);
  color: var(--ink);
  padding: var(--space-12) 0 var(--space-16);
}

.doc h2 {
  font-size: 1.8rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

.doc h2:first-child {
  margin-top: 0;
}

.doc ul {
  padding-left: 1.2em;
  margin: 0 0 var(--space-2);
}

.doc li {
  margin-bottom: var(--space-1);
}

.doc a {
  color: #3b4a7e;
}

.doc .updated {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

@media (max-width: 720px) {
  .summary {
    grid-template-columns: 1fr;
  }
}

.summary div {
  padding: var(--space-3);
  border-radius: 16px;
  background: var(--cream-deep);
}

.summary strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.summary span {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.faq details {
  border-bottom: 1px solid rgba(35, 38, 58, 0.14);
}

.faq summary:hover {
  color: #3b4a7e;
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  min-height: 64px;
  padding: var(--space-2) 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink-muted), var(--ink-muted)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--ink-muted), var(--ink-muted)) center / 1.5px 14px no-repeat;
  transition: transform 250ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .answer {
  padding-bottom: var(--space-3);
  color: var(--ink-muted);
}

.contact-card {
  margin-top: var(--space-8);
  padding: var(--space-6);
  border-radius: var(--radius);
  background: var(--dusk-800);
  color: var(--on-dark);
  text-align: center;
}

.contact-card p {
  color: var(--on-dark-muted);
}

.doc .contact-card h2 {
  margin-top: 0;
}

.doc .button-primary {
  color: var(--ink);
}

.contact-card .button {
  margin-top: var(--space-2);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .phone-screen,
  .phone-phrase {
    transition: none;
  }
}
