/* ============================================================================
 * Tutur Notes — site styles
 *
 * The palette is lifted from the app's default "Ember" theme so the site and
 * the product read as one thing: burnt orange (#B15013) on warm paper, near
 * black text, generous type. Dark mode mirrors the app, which lifts the accent
 * to #E07B3C because #B15013 does not clear the contrast floor on near black.
 * ==========================================================================*/

/* --- Tokens ------------------------------------------------------------- */

:root {
  --paper:        #FBF4EE;
  --paper-deep:   #F4E7DB;
  --card:         #FFFFFF;
  --ink:          #1C120C;
  --ink-soft:     #5C4A3E;
  --ink-faint:    #8A7869;
  --accent:       #B15013;
  --accent-deep:  #8E3F0D;
  --accent-wash:  rgba(177, 80, 19, 0.09);
  --bubble-in:    #EDE4DB;
  --line:         rgba(28, 18, 12, 0.12);
  --line-soft:    rgba(28, 18, 12, 0.07);
  --shadow-sm:    0 1px 2px rgba(28, 18, 12, 0.06);
  --shadow-md:    0 4px 16px rgba(28, 18, 12, 0.08);
  --shadow-lg:    0 24px 60px rgba(28, 18, 12, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter,
          Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
  --gutter: 24px;
  --radius: 18px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:       #14100D;
    --paper-deep:  #1A1511;
    --card:        #201A16;
    --ink:         #F6EEE7;
    --ink-soft:    #C3B3A6;
    --ink-faint:   #948477;
    --accent:      #E07B3C;
    --accent-deep: #F09A63;
    --accent-wash: rgba(224, 123, 60, 0.14);
    --bubble-in:   #2A231E;
    --line:        rgba(246, 238, 231, 0.14);
    --line-soft:   rgba(246, 238, 231, 0.08);
    --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg:   0 24px 60px rgba(0, 0, 0, 0.6);

    color-scheme: dark;
  }
}

/* --- Reset -------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 800;
}

p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* --- Layout primitives -------------------------------------------------- */

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

.wrap--narrow { max-width: 760px; }

section { padding-block: 88px; }

@media (max-width: 720px) {
  section { padding-block: 60px; }
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 5px 11px;
  border-radius: 999px;
}

.eyebrow--quiet {
  background: var(--accent-wash);
  color: var(--accent);
}

.section-title {
  font-size: clamp(30px, 4.4vw, 44px);
  max-width: 22ch;
}

.section-lede {
  margin-top: 16px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--ink-soft);
  max-width: 60ch;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .site-nav { gap: 16px; font-size: 14px; }
  .site-nav__optional { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* --- App Store badge ----------------------------------------------------
 * Rendered inline rather than loaded as an image so it scales cleanly and
 * needs no network request. Before launch, swap this for Apple's official
 * badge asset — see README.md. */

.appstore {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  color: #fff;
  border-radius: 12px;
  padding: 10px 18px 10px 16px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.15s ease;
}
.appstore:hover { transform: translateY(-1px); }

.appstore svg { width: 25px; height: 25px; flex: none; fill: #fff; }

.appstore__copy { display: flex; flex-direction: column; line-height: 1.08; }
.appstore__small {
  font-size: 10.5px;
  letter-spacing: 0.015em;
  opacity: 0.9;
}
.appstore__large {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.appstore--soon {
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  cursor: default;
}
.appstore--soon svg { fill: var(--ink-soft); }
.appstore--soon:hover { transform: none; }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 84px 0;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--paper-deep) 0%, transparent 62%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero__title {
  font-size: clamp(38px, 6.2vw, 62px);
  margin-top: 20px;
  max-width: 14ch;
}

.hero__lede {
  margin-top: 20px;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--ink-soft);
  max-width: 44ch;
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* inline-flex rather than flex so that when the copy centres and wraps on a
 * narrow screen the icon stays glued to the text instead of drifting out to
 * the left edge of the column. */
.hero__note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 40ch;
  text-align: left;
}

.hero__note svg { flex: none; margin-top: 3px; }

.hero__art {
  display: flex;
  justify-content: center;
  padding-bottom: 70px;
}

@media (max-width: 900px) {
  .hero { padding-block: 52px 0; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero__title, .hero__lede { max-width: none; margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__art { padding-bottom: 40px; }
}

/* --- Phone frame -------------------------------------------------------- */

.phone {
  position: relative;
  width: 100%;
  max-width: 306px;
  aspect-ratio: 1320 / 2868;
  border-radius: 46px;
  padding: 9px;
  background: linear-gradient(155deg, #48403a, #1d1814 46%, #3a322c);
  box-shadow: var(--shadow-lg);
  flex: none;
}

.phone::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 21px;
  background: #0c0a09;
  border-radius: 999px;
  z-index: 2;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 38px;
  background: var(--card);
}

.phone--sm { max-width: 232px; border-radius: 38px; padding: 7px; }
.phone--sm::after { top: 16px; height: 16px; }
.phone--sm img { border-radius: 32px; }

/* --- Logo strip / promise band ------------------------------------------ */

.band {
  background: var(--paper-deep);
  border-block: 1px solid var(--line-soft);
}

.band__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.band__item h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.band__item p {
  color: var(--ink-soft);
  font-size: 15.5px;
}

.band__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .band__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* --- Feature grid ------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

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

.feature {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}

.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-wash);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.feature__icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.feature h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.02em; }
.feature p { color: var(--ink-soft); font-size: 15.5px; }

/* --- Screenshot showcase ------------------------------------------------ */

.showcase {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 12px 0 32px;
  margin-top: 44px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.showcase::-webkit-scrollbar { height: 8px; }
.showcase::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.shot {
  flex: none;
  scroll-snap-align: center;
  width: 232px;
  text-align: center;
}

.shot figcaption {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* --- Privacy band ------------------------------------------------------- */

.privacy-band {
  background: var(--ink);
  color: var(--paper);
}

@media (prefers-color-scheme: dark) {
  .privacy-band { background: var(--paper-deep); border-block: 1px solid var(--line-soft); }
}

.privacy-band .section-title { color: var(--paper); }
.privacy-band .section-lede { color: color-mix(in srgb, var(--paper) 72%, transparent); }

@media (prefers-color-scheme: dark) {
  .privacy-band .section-title { color: var(--ink); }
  .privacy-band .section-lede { color: var(--ink-soft); }
}

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 36px;
}

@media (max-width: 760px) { .privacy-list { grid-template-columns: 1fr; } }

.privacy-list li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--paper) 88%, transparent);
}

@media (prefers-color-scheme: dark) {
  .privacy-list li { color: var(--ink); }
}

.privacy-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-color-scheme: light) {
  .privacy-band .privacy-list svg { stroke: #E07B3C; }
}

/* --- FAQ ---------------------------------------------------------------- */

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

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

.faq summary {
  cursor: pointer;
  padding: 22px 44px 22px 0;
  font-weight: 600;
  font-size: 17.5px;
  letter-spacing: -0.015em;
  position: relative;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

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

.faq details > div {
  padding-bottom: 24px;
  color: var(--ink-soft);
  max-width: 68ch;
}

.faq details > div p + p { margin-top: 12px; }

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

.cta {
  text-align: center;
  background: var(--paper-deep);
  border-block: 1px solid var(--line-soft);
}

.cta__actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.site-footer {
  padding-block: 52px;
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px;
  color: var(--ink-faint);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-footer nav a { color: var(--ink-soft); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }

.site-footer__legal { max-width: 46ch; }
.site-footer__legal strong { color: var(--ink); font-weight: 600; }

/* --- Legal & support documents ------------------------------------------ */

.doc-header {
  padding-block: 64px 40px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-deep);
}

.doc-header h1 {
  font-size: clamp(32px, 5vw, 46px);
  margin-top: 16px;
}

.doc-dates {
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--ink-faint);
}

.doc-summary {
  margin-top: 26px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 66ch;
}
.doc-summary strong { color: var(--ink); }

.toc {
  margin-top: 36px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.toc h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 14px;
}
.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
}
.toc li { margin-bottom: 7px; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

@media (max-width: 640px) { .toc ol { columns: 1; } }

.doc {
  padding-block: 48px 88px;
  font-size: 16.5px;
}

.doc h2 {
  font-size: 23px;
  margin-top: 52px;
  margin-bottom: 14px;
  scroll-margin-top: 80px;
  letter-spacing: -0.02em;
}

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

.doc h3 {
  font-size: 17.5px;
  margin-top: 30px;
  margin-bottom: 10px;
  font-weight: 700;
  scroll-margin-top: 80px;
}

.doc p { margin-bottom: 15px; color: var(--ink-soft); }
.doc p strong, .doc li strong { color: var(--ink); font-weight: 600; }

.doc ul, .doc ol { margin: 0 0 18px; padding-left: 24px; color: var(--ink-soft); }
.doc li { margin-bottom: 9px; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 15.5px;
}

.doc-table-scroll { overflow-x: auto; }

.doc th, .doc td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--ink-soft);
}

.doc th {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom-color: var(--line);
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--accent-wash);
  border-radius: 12px;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.callout strong { color: var(--ink); }

.doc-footer-note {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px;
  color: var(--ink-faint);
}

/* --- Support page ------------------------------------------------------- */

.contact-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

.contact-card h2 { font-size: 21px; margin-bottom: 10px; margin-top: 0; }
.contact-card p { color: var(--ink-soft); margin-bottom: 18px; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}
.contact-email:hover { text-decoration: underline; }

.meta-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
}
.meta-list li span:last-child { color: var(--ink); font-weight: 500; text-align: right; }

/* --- Utilities ---------------------------------------------------------- */

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

.center { text-align: center; }
.mt-0 { margin-top: 0; }
