@font-face {
  font-family: "iA Writer Quattro S";
  src: url("assets/iawriter-quattro-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "iA Writer Quattro S";
  src: url("assets/iawriter-quattro-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #f4f2ef;
  --paper-raised: #fbfaf8;
  --paper-sunken: #ece9e4;

  --rule: #d6d2cb;
  --rule-strong: #b9b4ab;

  --ink: #15171b;
  --ink-2: #393d44;
  --muted: #5f636b;
  --dim: #646870;

  --accent: #2f75d9;
  --accent-ink: #2260bd;
  --accent-hover: #174f9d;
  --accent-line: rgba(47, 117, 217, 0.4);
  --accent-wash: rgba(47, 117, 217, 0.09);

  --goal: #b63328;
  --save: #0f6f68;
  --corner: #3d7a33;

  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --text: "iA Writer Quattro S", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --col: 1160px;
  --pad: 40px;
  --header-height: 62px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { max-width: 100%; }

a { color: var(--accent-ink); }

strong { font-weight: 700; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

h1 em, h2 em {
  font-style: italic;
  color: var(--accent);
}

p { margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  padding: 10px 16px;
  z-index: 40;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

.main-inner {
  position: relative;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--pad);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.main-inner::before,
.main-inner::after,
.footer-inner::before,
.footer-inner::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 7px;
  height: 7px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  transform: rotate(45deg);
  pointer-events: none;
}

.main-inner::before,
.footer-inner::before { left: -4px; }

.main-inner::after,
.footer-inner::after { right: -4px; }

.footer-inner::before,
.footer-inner::after { background: var(--paper-sunken); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 242, 239, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand img { display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
  letter-spacing: 0;
}

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

.site-nav a:hover { color: var(--ink); }

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

.site-nav .nav-download {
  background: var(--accent-ink);
  color: #fff;
  padding: 7px 14px;
  border-radius: 3px;
}

.site-nav .nav-download:hover {
  background: var(--accent-hover);
  color: #fff;
}

.kicker,
.eyebrow,
.platform-label,
.index,
.panel-title,
.release-status {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--muted);
}

.lede,
.hero-lede,
.product-summary {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.66;
}

figcaption {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0;
}

.text-link {
  display: inline-block;
  font-size: 13.5px;
  letter-spacing: 0;
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
}

.text-link:hover { border-bottom-color: var(--accent-ink); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.button-primary {
  background: var(--accent-ink);
  color: #fff;
}

.button-primary:hover { background: var(--accent-hover); }

.button-outline {
  background: var(--paper-raised);
  border-color: var(--rule-strong);
  color: var(--ink);
}

.button-outline:hover { border-color: var(--ink-2); }

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

.band-soft { background: var(--paper-sunken); }

.band-soft .main-inner::before,
.band-soft .main-inner::after { background: var(--paper-sunken); }

.product-section,
.downloads-section { padding: 72px 0 80px; }

.handoff-section { padding: 60px 0 64px; }

.hero { padding: 0 0 64px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding: 76px 0 56px;
}

.hero-copy .kicker { margin-bottom: 22px; }

.hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin: 0 0 22px;
}

.hero-lede { max-width: 33em; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 30px;
}

.hero-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--dim);
  margin: 22px 0 0;
}

.spec-panel {
  border: 1px solid var(--rule);
  background-color: var(--paper-raised);
  background-image: repeating-linear-gradient(
    45deg,
    var(--accent-wash) 0 1px,
    transparent 1px 7px
  );
  padding: 18px 20px 20px;
}

.spec-panel .panel-title {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.spec-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-grid li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dotted var(--rule);
}

.spec-grid li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.spec-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.spec-value {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
}

.hero-shot,
.shot,
.strip { margin: 0; }

.hero-shot img,
.shot img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.10))
          drop-shadow(0 18px 19px rgba(30, 27, 22, 0.18));
}

.shot-crop { border-radius: 6px; }

.frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-bottom: 0;
  background: var(--paper-raised);
}

.frame-bar span:last-child { color: var(--dim); }

.shot-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 30px;
  margin-top: 56px;
}

.shot-pair > .shot {
  display: flex;
  flex-direction: column;
}

.shot-pair > .shot > img {
  aspect-ratio: 1342 / 949;
  object-fit: cover;
}

.hero-shot > figcaption { margin-top: 12px; }

.shot-pair > .shot > figcaption {
  margin-top: auto;
  padding-top: 12px;
}

.strip { margin-top: 56px; }

.strip img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-strong);
}

.strip > figcaption { margin-top: 12px; }

.mac-footer-link { margin: 48px 0 0; }

.product-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: end;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--rule);
}

.product-heading h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.12;
  margin: 16px 0 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature {
  padding: 32px 30px 8px;
  border-right: 1px solid var(--rule);
}

.feature:first-child { padding-left: 0; }

.feature:last-child {
  padding-right: 0;
  border-right: 0;
}

.feature:nth-child(1) { --tint: var(--goal); }
.feature:nth-child(2) { --tint: var(--save); }
.feature:nth-child(3) { --tint: var(--corner); }

.feature .index {
  display: flex;
  align-items: center;
  gap: 9px;
}

.feature .index::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--tint, var(--accent));
}

.feature h3 {
  font-size: 1.28rem;
  line-height: 1.24;
  margin: 14px 0 10px;
}

.feature p {
  color: var(--ink-2);
  max-width: 34em;
}

.ios-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 56px;
  align-items: center;
}

.ios-copy h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.12;
  margin: 16px 0 20px;
}

.device-requirement {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 24px 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.product-note {
  color: var(--muted);
  font-size: 13.5px;
  margin: 26px 0 0;
  max-width: 36em;
}

.ios-screens {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--rule);
  background-color: var(--paper-raised);
  background-image: repeating-linear-gradient(
    45deg,
    var(--accent-wash) 0 1px,
    transparent 1px 7px
  );
}

.ios-screens img {
  display: block;
  height: auto;
  border-radius: 14px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.10))
          drop-shadow(0 14px 30px rgba(30, 27, 22, 0.20));
}

.ipad-screen { width: 50%; }
.iphone-screen { width: 30%; }

.download-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.download-heading h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  margin: 0;
}

.download-heading p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.download-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}

.download-platform {
  display: flex;
  align-items: center;
  gap: 14px;
}

.download-platform img { border-radius: 10px; }

.download-platform h3 {
  font-size: 1.14rem;
  margin: 0;
}

.download-info .release-status {
  color: var(--accent-ink);
  margin-bottom: 6px;
}

.download-info p {
  color: var(--ink-2);
  max-width: 40em;
}

.download-footnote {
  font-size: 13px;
  color: var(--dim);
  margin: 26px 0 0;
}

.handoff-inner { text-align: center; }

.handoff-inner h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  margin: 0 0 14px;
}

.handoff-inner p {
  color: var(--ink-2);
  max-width: 40em;
  margin: 0 auto 22px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 300px;
  gap: 48px;
  align-items: start;
  padding: 76px 0 64px;
}

.intro h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  line-height: 1.08;
  margin: 18px 0 20px;
}

.not-found { grid-template-columns: minmax(0, 1fr); }

.not-found-page main { display: flex; }

.not-found-page main > .main-inner { display: flex; }

.not-found-page .not-found {
  flex: 1;
  width: 100%;
  align-items: center;
}

.fact-list {
  list-style: none;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  background-color: var(--paper-raised);
  background-image: repeating-linear-gradient(
    45deg,
    var(--accent-wash) 0 1px,
    transparent 1px 7px
  );
}

.fact-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dotted var(--rule);
}

.fact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fact-list span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.fact-list strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
}

.section { padding: 64px var(--pad) 72px; }

.section-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.16;
  margin: 14px 0 12px;
}

.section-heading p {
  color: var(--ink-2);
  max-width: 34em;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.steps li:first-child {
  border-top: 0;
  padding-top: 0;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-ink);
  letter-spacing: 0;
  padding-top: 4px;
}

.steps h3 {
  font-size: 1.16rem;
  margin: 0 0 8px;
}

.steps p {
  color: var(--ink-2);
  max-width: 44em;
}

.faq details {
  border-top: 1px solid var(--rule);
  padding: 4px 0;
}

.faq details:first-child { border-top: 0; }

.faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 16px 28px 16px 0;
  font-family: var(--serif);
  font-size: 1.12rem;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 15px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent-ink);
}

.faq details[open] summary::after { content: "\2212"; }

.faq p {
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 44em;
}

.contact-line p {
  color: var(--ink-2);
  margin: 0 0 16px;
  max-width: 44em;
}

.contact-line a {
  font-family: var(--mono);
  font-size: 13px;
}

.policy-copy section {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.policy-copy section:first-child {
  border-top: 0;
  padding-top: 0;
}

.policy-copy h3 {
  font-size: 1.14rem;
  margin: 0 0 8px;
}

.policy-copy p,
.policy-copy li { color: var(--ink-2); }

.policy-copy p {
  margin: 0 0 10px;
  max-width: 44em;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-sunken);
}

.footer-inner {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  padding: 26px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.footer-brand p {
  font-family: var(--serif);
  font-size: 1.08rem;
}

.footer-brand span,
.footer-nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

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

.footer-nav a { text-decoration: none; }

.footer-nav a:hover { color: var(--ink); }

@media (min-width: 761px) and (max-width: 1167px) {
  .main-inner,
  .header-inner,
  .footer-inner { width: calc(100% - 8px); }
}

@media (max-width: 1000px) {
  :root { --pad: 28px; }

  .hero-grid,
  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .spec-panel,
  .fact-list { max-width: 420px; }

  .product-heading,
  .section-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .ios-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .feature-grid { grid-template-columns: minmax(0, 1fr); }

  .feature {
    padding: 26px 0;
    border-right: 0;
    border-top: 1px solid var(--rule);
  }

  .feature:first-child { border-top: 0; }

  .shot-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 760px) {
  :root { --pad: 20px; }

  body { font-size: 14.5px; }

  .main-inner,
  .header-inner,
  .footer-inner {
    border-left: 0;
    border-right: 0;
  }

  .main-inner::before,
  .main-inner::after,
  .footer-inner::before,
  .footer-inner::after { display: none; }

  .hero { padding-bottom: 44px; }

  .hero-grid { padding: 52px 0 40px; }

  .lede,
  .hero-lede,
  .product-summary { font-size: 15.5px; }

  .product-section,
  .downloads-section { padding: 52px 0 56px; }

  .section { padding: 48px var(--pad) 52px; }

  .intro { padding: 52px 0 48px; }

  .site-nav { gap: 16px; }

  .download-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .download-row .button { justify-self: start; }

  .shot-pair,
  .strip { margin-top: 40px; }
}

@media (max-width: 520px) {
  .header-inner { gap: 12px; }

  .brand img {
    width: 112px;
    height: auto;
  }

  .site-nav { gap: 12px; }

  .home-page .site-nav a:not(.nav-download),
  .secondary-page .site-nav a:first-child { display: none; }

  .frame-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .hero-actions .button { width: 100%; }

  .spec-panel,
  .fact-list { max-width: none; }

  .ios-screens {
    padding: 16px;
    gap: 14px;
  }

  .steps li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
  }
}

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

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
