/* ---------------------------------------------------------------
   fisheggs.au — all of the site's styling lives in this one file.
   Colours are set as custom properties at the top; change them there.
   --------------------------------------------------------------- */

:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #1c1b18;
  --ink-soft: #57544d;
  --ink-faint: #8a867c;
  --rule: #e2ded4;
  --rule-strong: #c9c3b5;
  --link: #2f5d7c;
  --accent: #4a5a88;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 62rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16161a;
    --card: #1e1e23;
    --ink: #eceae4;
    --ink-soft: #b3afa6;
    --ink-faint: #85817a;
    --rule: #2d2d34;
    --rule-strong: #414049;
    --link: #8cb6d4;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--card);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* --- masthead & footer ----------------------------------------- */

.masthead,
.footer,
main {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 600 1.2rem/1 var(--serif);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

main {
  flex: 1;
  padding-block: 1rem 4rem;
}

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 3rem;
  color: var(--ink-faint);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.footer p {
  margin: 0;
}
.footer a {
  color: var(--ink-faint);
}

/* --- home page -------------------------------------------------- */

.hero {
  padding-block: 2rem 2.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}
.hero-line {
  font: 400 clamp(1.5rem, 3.6vw, 2rem) / 1.3 var(--serif);
  margin: 0;
  max-width: 24em;
  letter-spacing: -0.005em;
}

.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 34em;
}

.section-title {
  font: 600 0.78rem/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}

.tile-section {
  margin-bottom: 3rem;
}

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.tile {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tile:hover,
.tile:focus-within {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tile-icon {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.tile-icon img {
  width: 1.6rem;
  height: 1.6rem;
}
/* An app icon fills its chip and carries its own background. */
.tile-icon--app {
  background: none;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
}
.tile-icon--app img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.tile-monogram {
  font: 600 1.15rem/1 var(--serif);
}

.tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.tile-name {
  margin: 0;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
}

/* The tile's own link covers the whole card, so the card is clickable... */
.tile-link {
  color: inherit;
  text-decoration: none;
}
.tile-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.tile-link:hover {
  text-decoration: underline;
}

.tile-blurb {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Clamped only once the script has run, so a blurb is never cut off when
   JavaScript is unavailable to put the button there. */
.js .tile-blurb {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.js .tile--expanded .tile-blurb {
  display: block;
  overflow: visible;
}

.tile-more {
  position: relative;
  z-index: 1;
  align-self: start;
  margin: 0.15rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--link);
  cursor: pointer;
}
.tile-more:hover {
  text-decoration: underline;
}

/* ...and the secondary links sit above that overlay so they stay clickable. */
.tile-links {
  position: relative;
  z-index: 1;
  margin: 0.4rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: 0.82rem;
}
.tile-links a {
  text-decoration: none;
}
.tile-links a:hover {
  text-decoration: underline;
}

.badge {
  font: 600 0.62rem/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25em 0.5em;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink-faint);
  display: inline-block;
  margin-left: 0.4em;
  vertical-align: 0.15em;
  white-space: nowrap;
}

/* --- documents & inner pages ------------------------------------ */

.sheet {
  max-width: 44rem;
  padding-block: 1.5rem 0;
}

.sheet-head {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.sheet-head h1 {
  font: 400 clamp(1.8rem, 4.5vw, 2.4rem) / 1.15 var(--serif);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.crumb {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}
.crumb span {
  margin-inline: 0.35rem;
}

.meta {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin: 0;
}

.prose h2 {
  font: 600 1.15rem/1.3 var(--sans);
  margin: 2.25rem 0 0.6rem;
}
.prose h3 {
  font: 600 1rem/1.3 var(--sans);
  margin: 1.75rem 0 0.5rem;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}
.prose li {
  margin-bottom: 0.35rem;
}
.prose blockquote {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--rule-strong);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.prose th {
  font-weight: 600;
  color: var(--ink-soft);
}

.doc-group {
  margin-bottom: 2.25rem;
}
.doc-group h2 {
  font: 600 1.02rem/1.3 var(--sans);
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.doc-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
