/* ==========================================================================
   fatimagomes.studio — base layer
   Paper, type scale, wash, and the shared page shell.
   Page-specific rules live in their own file, never here.
   ========================================================================== */

* { box-sizing: border-box; }

html {
  /* Never let a decorative layer create a sideways scrollbar. */
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Paper grain ------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.30;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* --- Vignette ---------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(120, 90, 50, 0.09) 100%);
}

/* --- Watercolour wash --------------------------------------------------
   The SVG filters here are expensive. It is hidden below 900px until the
   phone measurement is done — a pre-rendered WebP replaces it if the live
   filters stutter on a real device.
   ----------------------------------------------------------------------- */
.watercolour {
  position: fixed;
  top: -12vh;
  right: -14vw;
  width: 78vw;
  height: 105vh;
  max-width: 980px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: bloom 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
}

@keyframes bloom {
  0%   { opacity: 0;    transform: scale(0.94); filter: blur(8px); }
  100% { opacity: 0.85; transform: scale(1);    filter: blur(0px); }
}

@media (max-width: 900px) {
  .watercolour { display: none; }
}

/* --- Shell ------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 2.4rem 1.8rem;
}

/* --- Skip link --------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7em 1.1em;
  z-index: 300;
  font-family: var(--font-body);
  text-decoration: none;
}
.skip:focus {
  left: 0.6rem;
  top: 0.6rem;
}

/* --- Masthead ---------------------------------------------------------- */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}

.mark {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 500;
  font-style: italic;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.mark .sep {
  color: var(--ochre-text);
  margin: 0 0.15em;
  font-style: normal;
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ochre-text);
  border-color: var(--ochre-text);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--rule-strong);
}

/* --- Shared type ------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
}

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-size: 0.8rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ochre-text);
}

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.45;
  max-width: 34ch;
}

/* --- Links in prose ---------------------------------------------------- */
.prose a,
.link {
  color: var(--ochre-text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.prose a:hover,
.link:hover { color: var(--rose-text); }

/* --- Ornament ---------------------------------------------------------- */
.ornament {
  width: 64px;
  height: 24px;
  display: block;
}

/* --- Focus ------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--ochre-text);
  outline-offset: 3px;
}

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.6rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-style: italic;
  border-bottom: 1px dotted var(--ink-muted);
  padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ochre-text);
  border-color: var(--ochre-text);
}
.footer-contact p { margin: 0 0 0.35rem; }

.footer-meta {
  display: flex;
  gap: 1.3rem;
  align-items: baseline;
  font-style: italic;
  color: var(--ink-muted);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}
.footer-meta .dot {
  color: var(--ochre-text);
  font-style: normal;
}

/* --- Motion ------------------------------------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .watercolour { opacity: 0.85; }
}
