/* Aisoria website: one stylesheet for every page. Colours follow the app's
   palette (MyCloset.Flutter/lib/theme/drobe_colors.dart): light by default,
   the app's dark palette when the device asks for it. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/CormorantGaramond-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #f8f7f3;
  --surface: #ffffff;
  --hairline: #e2dfd6;
  --text: #1a1a18;
  --muted: #66645d;
  --accent: #534ab7;
  --accent-soft: #e4e2f9;
  --amber: #ef9f27;
  --warning-bg: #fdf0e6;
  --warning-text: #9a3412;
  --warning-edge: #ea580c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121212;
    --surface: #141729;
    --hairline: #2a2a4a;
    --text: #f5f4fa;
    --muted: #a3a6bf;
    --accent: #afa9ec;
    --accent-soft: #1b1f36;
    --warning-bg: #2b1a10;
    --warning-text: #fdba8c;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Header and footer */

.site-header,
.site-footer,
main {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 24px;
  padding-bottom: 8px;
}

.wordmark {
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
  text-decoration: none;
  /* The brand's amber brush rule under a one-colour wordmark. */
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 100% 4px no-repeat;
  padding-bottom: 6px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 8px;
}
.site-footer a {
  color: var(--muted);
}

/* Content */

main {
  padding-top: 16px;
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
}
h1 {
  font-size: 40px;
  margin: 24px 0 8px;
}
h2 {
  font-size: 28px;
  margin: 40px 0 8px;
  scroll-margin-top: 16px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 4px;
}

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

.updated {
  color: var(--muted);
  font-size: 14px;
}

ul,
ol {
  padding-left: 22px;
}
li + li {
  margin-top: 4px;
}

strong {
  font-weight: 600;
}

/* A summary or call-out, in a tinted card. */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 20px 0;
}
.card.accent {
  background: var(--accent-soft);
  border-color: transparent;
}
.card > :first-child {
  margin-top: 0;
}
.card > :last-child {
  margin-bottom: 0;
}

.draft {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-left: 4px solid var(--warning-edge);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0 8px;
  font-size: 15px;
}

.toc {
  font-size: 15px;
}
.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 8px 0 0;
}

/* Tables become stacked rows on narrow screens. */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0 20px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--hairline);
}
th {
  font-weight: 600;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 16px;
  min-height: 48px;
}
@media (prefers-color-scheme: dark) {
  .button {
    color: #121212;
  }
}

.hero {
  padding: 32px 0 8px;
}
.hero h1 {
  font-size: 48px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}
.features li {
  margin: 0;
}

@media (max-width: 560px) {
  h1 {
    font-size: 34px;
  }
  .hero h1 {
    font-size: 40px;
  }
  h2 {
    font-size: 25px;
  }
  .toc ol {
    columns: 1;
  }
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }
  thead {
    position: absolute;
    left: -9999px;
  }
  tr {
    border-bottom: 1px solid var(--hairline);
    padding: 8px 0;
  }
  td {
    border: 0;
    padding: 2px 0;
  }
  td:first-child {
    font-weight: 600;
  }
}
