/* The site's pages (lib/site.rb). Palette mirrors styles.css and the iOS app;
   fonts are self-hosted in /fonts. Editorial rather than boxed: photographs,
   a serif display face, hairlines instead of cards, square buttons. */
:root {
  --background: #10140e;
  --surface: #161b14;
  --card: #1b211a;
  --card-elevated: #232b22;
  --cream: #f0e8d4;
  --cream-soft: rgba(240, 232, 212, 0.78);
  --paper: #f3eee2;
  --ink: #1b211a;
  --ink-soft: #4d544a;
  --ink-line: rgba(27, 33, 26, 0.14);
  --gold: #d9a848;
  --gold-deep: #a97c28;
  --teal: #4bb8a9;
  --muted: #9aa294;
  --line: rgba(240, 232, 212, 0.12);
  --gutter: 16px;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

.narrow {
  max-width: 820px;
}

/* ---------- type ---------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.3px;
}

.display-small {
  font-size: clamp(28px, 3.4vw, 36px);
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.eyebrow-lines {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.eyebrow-lines::before,
.eyebrow-lines::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

@media (max-width: 560px) {
  .eyebrow {
    letter-spacing: 2.5px;
  }

  .eyebrow-lines {
    gap: 12px;
    white-space: nowrap;
  }

  .eyebrow-lines::before,
  .eyebrow-lines::after {
    width: 22px;
  }
}

.lead {
  font-size: 18px;
  color: var(--cream-soft);
}

.section-lead {
  max-width: 640px;
  margin-top: 18px;
  color: var(--cream-soft);
}

.note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.button {
  display: inline-block;
  padding: 15px 30px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--background);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.button:hover {
  background: transparent;
  color: var(--gold);
}

.button-ghost {
  background: transparent;
  border-color: rgba(240, 232, 212, 0.55);
  color: var(--cream);
}

.button-ghost:hover {
  border-color: var(--cream);
  color: var(--cream);
  background: rgba(240, 232, 212, 0.08);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 20, 14, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}

/* On the home page the header floats over the photographs until you scroll. */
.page-home .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: linear-gradient(rgba(10, 12, 9, 0.55), rgba(10, 12, 9, 0));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.page-home .site-header.is-scrolled {
  background: rgba(16, 20, 14, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav > a {
  padding: 8px 12px;
  color: var(--cream-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

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

.site-nav > .nav-library {
  margin-left: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(240, 232, 212, 0.45);
  color: var(--cream);
}

.site-nav > .nav-library:hover,
.site-nav > .nav-library[aria-current="page"] {
  border-color: var(--gold);
  color: var(--gold);
}

.language-menu {
  position: relative;
  margin-left: 6px;
}

.language-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 6px;
  color: var(--cream-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
}

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

.language-menu[open] summary,
.language-menu summary:hover {
  color: var(--gold);
}

.language-list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  min-width: 180px;
  padding: 8px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.language-list a {
  padding: 9px 18px;
  color: var(--cream-soft);
  text-decoration: none;
  font-size: 15px;
}

.language-list a:hover {
  background: var(--card);
  color: var(--cream);
}

.language-list a[aria-current="true"] {
  color: var(--gold);
}

@media (max-width: 720px) {
  .nav-secondary {
    display: none;
  }

  .site-nav > .nav-library {
    margin-left: 0;
    padding: 8px 12px;
    letter-spacing: 1.2px;
  }
}

/* ---------- home: hero ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px 0 96px;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

.hero-slides,
.hero-slides::after {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-slides::after {
  content: "";
  z-index: 1;
  background:
    linear-gradient(rgba(10, 12, 9, 0.45), rgba(10, 12, 9, 0.35) 40%, rgba(16, 20, 14, 0.92)),
    radial-gradient(80% 60% at 50% 50%, rgba(10, 12, 9, 0.35), transparent);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease, transform 7.5s ease-out;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  display: grid;
  justify-items: center;
  max-width: 900px;
}

.hero h1 {
  margin-top: 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.hero .lead {
  max-width: 620px;
  margin-top: 26px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.store-soon {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid var(--cream);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0.7;
}

.hero-dot.is-active {
  background: var(--gold);
  border-color: var(--gold);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
    transform: none;
  }
}

/* ---------- home: sections ---------- */

.section {
  padding: 96px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 128px 0;
  }
}

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

.section-light .section-lead,
.section-light p {
  color: var(--ink-soft);
}

.section-light .note {
  color: var(--ink-soft);
}

.section-head {
  max-width: 760px;
  margin-bottom: 48px;
}

/* features */

.features-layout {
  display: grid;
  gap: 48px;
}

@media (min-width: 960px) {
  .features-layout {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 80px;
    align-items: start;
  }

  .features-art {
    position: sticky;
    top: 104px;
  }
}

.features-art {
  margin: 0;
}

.features-art img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.feature-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.feature-number {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.feature h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
}

.feature p {
  margin-top: 8px;
  color: var(--cream-soft);
}

.ai-badge {
  padding: 2px 8px;
  border: 1px solid rgba(217, 168, 72, 0.6);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 1.6;
}

/* pricing */

.price-table-wrap {
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.price-table th,
.price-table td {
  padding: 22px 20px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--ink-line);
}

.price-table thead th {
  padding-top: 0;
  padding-bottom: 16px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}

.price-table thead .price-ai {
  color: var(--gold-deep);
}

.price-table th:first-child {
  padding-left: 0;
}

/* The mbooks AI column sits on a faint gold band. */
.price-table .price-ai {
  background: rgba(217, 168, 72, 0.1);
}

.price-table tbody th {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.price-table tbody th span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
}

.price-cell {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.price-none {
  color: var(--ink-soft);
  font-size: 22px;
}

@media (max-width: 560px) {
  .price-table th,
  .price-table td {
    padding: 16px 10px;
  }

  .price-table th:first-child {
    width: 42%;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .price-table tbody th {
    font-size: 19px;
  }

  .price-table tbody th span {
    font-size: 12px;
  }

  .price-cell {
    font-size: 22px;
  }
}

.ai-split {
  display: grid;
  gap: 32px;
  margin-top: 88px;
  padding-top: 48px;
  border-top: 1px solid var(--ink-line);
}

@media (min-width: 900px) {
  .ai-split {
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 48px;
  }

  .ai-option {
    padding-left: 32px;
    border-left: 1px solid var(--ink-line);
  }
}

.ai-intro p {
  margin-top: 14px;
}

.ai-option h4 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.ai-option p {
  margin-top: 10px;
}

/* privacy band */

.band {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 96px 0;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

.band-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 12, 9, 0.62);
}

.band-content {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.band .lead {
  max-width: 600px;
}

.band .button {
  margin-top: 10px;
}

/* languages */

.languages {
  text-align: center;
}

.languages .section-lead {
  margin: 18px auto 0;
}

.language-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

.language-names a {
  padding: 6px 18px;
  color: var(--cream-soft);
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
}

.language-names a + a {
  border-left: 1px solid var(--line);
}

.language-names a:hover,
.language-names a[aria-current="true"] {
  color: var(--gold);
}

/* ---------- inner pages ---------- */

.section-top {
  padding-top: 72px;
}

.card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.subheading {
  margin: 56px 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
}

.page-support h1,
.policy h1 {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 60px);
}

.contact {
  margin-top: 40px;
  border-left: 2px solid var(--gold);
}

.contact h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
}

.contact > p {
  color: var(--cream-soft);
}

.contact .button {
  margin-top: 22px;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  padding: 22px 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  margin-left: 12px;
  color: var(--gold);
  font-family: var(--sans);
  font-weight: 300;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 0 24px;
  color: var(--cream-soft);
}

/* library sign-in */

.signin {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px - 220px);
  padding-top: 72px;
}

.signin-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 44px 32px;
}

.signin-card .logo-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 22px;
}

.signin-card h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  margin-bottom: 12px;
}

.signin-card > p {
  color: var(--cream-soft);
}

.apple-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
  padding: 15px 20px;
  border: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
}

.apple-button svg {
  width: 17px;
  height: 20px;
  fill: currentColor;
}

.apple-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* privacy policy */

.updated {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.policy section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.policy h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
}

.policy section p,
.policy li {
  color: var(--cream-soft);
}

.policy section p + p {
  margin-top: 12px;
}

.policy ul {
  padding-left: 20px;
  margin: 8px 0 0;
}

.policy li + li {
  margin-top: 8px;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.page-support .site-footer,
.page-privacy .site-footer,
.page-library .site-footer {
  margin-top: 112px;
}

.footer-inner {
  display: grid;
  gap: 28px;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.footer-inner p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-links a {
  color: var(--cream-soft);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.footer-links a[href^="mailto:"] {
  text-transform: none;
  letter-spacing: 0.3px;
  font-size: 15px;
}

.footer-links a:hover {
  color: var(--gold);
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
