/* Atelier Arland — shared tokens and components for the homepage and the journal. */

@font-face {
  font-family: "Cormorant";
  src: url("/assets/fonts/Cormorant-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant";
  src: url("/assets/fonts/Cormorant-Italic-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-Italic-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pinyon Script";
  src: url("/assets/fonts/PinyonScript-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("/assets/fonts/Cinzel-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette drawn from the portrait: oatmeal knit, navy pleats, lavender shadows, a little blush. */
  --paper: #faf6f0;
  --paper-2: #f3ece2;
  --card: #fffdf9;
  --knit: #ebe0d2;
  --cream: #fbf7f0;
  --ink: #283053;
  --ink-2: #4a5070;
  --muted: #6c6872;
  --sepia: #7a5c4c;
  --night: #232a48;
  --night-2: #2c3457;
  --night-muted: #b9b6cc;
  --line: rgba(122, 92, 76, 0.2);
  --line-strong: rgba(122, 92, 76, 0.42);
  --rose: #eaa29c;
  --rose-deep: #a4524d;
  --lavender: #b8acdc;
  --lavender-deep: #6e62a6;
  --honey: #e2ae57;
  --honey-deep: #8f6420;
  --sky: #9dbbe0;
  --sky-deep: #46688f;
  --sage: #a9c8a8;
  --sage-deep: #4a7457;
  --peach: #f1cdb2;
  --peach-deep: #7a5c4c;
  --accent: var(--rose);
  --accent-deep: var(--rose-deep);

  --font-display: "Cormorant", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --font-caps: "Cinzel", "Cormorant", "Times New Roman", serif;

  --wrap: 1240px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --radius: 14px;
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 40px -26px rgba(40, 48, 83, 0.38);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(52rem 34rem at 92% -6%, rgba(241, 205, 178, 0.42), transparent 70%),
    radial-gradient(44rem 30rem at -8% 22%, rgba(201, 192, 230, 0.32), transparent 70%),
    var(--paper);
  font: 400 1rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* A faint dotted notebook grid behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(122, 92, 76, 0.16) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
}

main {
  flex: 1;
  overflow-x: clip;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a,
button,
summary,
select {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection {
  background: rgba(234, 162, 156, 0.42);
  color: var(--ink);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.85rem;
  transition: top 160ms ease;
}

.skip:focus {
  top: 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 240, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
}

.site-header .wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.25rem 0;
}

.brand img {
  display: block;
  width: auto;
  height: 42px;
  transition: transform 400ms var(--ease);
}

.brand:hover img {
  transform: rotate(-2deg) scale(1.02);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-size: 0.88rem;
  font-weight: 500;
}

.site-nav a {
  position: relative;
  padding: 0.5rem 0;
  color: var(--ink-2);
  transition: color 160ms ease;
}

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

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 6px;
  height: 6px;
  background: var(--rose);
  transform: translateX(-50%) rotate(45deg) scale(0);
  transition: transform 200ms var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: translateX(-50%) rotate(45deg) scale(1);
}

.header-cta {
  flex-shrink: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0.7rem 1.35rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 0.88rem/1.1 var(--font-body);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms ease, color 180ms ease;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 -1px var(--rose);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}

.btn-primary:hover {
  background: #1d2442;
  color: var(--cream);
}

.btn-ghost {
  background: rgba(255, 253, 249, 0.6);
}

.btn-ghost:hover {
  background: var(--card);
}

.btn-small {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-cream {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--ink);
}

.btn-cream:hover {
  background: #fff;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(var(--rose), var(--rose)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 0.15rem;
  transition: background-size 220ms var(--ease), color 160ms ease;
}

.text-link:hover {
  background-size: 100% 100%;
  color: var(--ink);
}

/* ---------------------------------------------------- Labels & headings */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  color: var(--sepia);
  font: 650 0.72rem/1.5 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.kicker::before,
.sparkle {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background: var(--accent);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.section {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}

.section-head {
  position: relative;
  isolation: isolate;
  max-width: 46rem;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}

.section-head h2 {
  margin: 0 0 1rem;
  font: 600 clamp(2.4rem, 5vw, 3.9rem)/1.02 var(--font-display);
  letter-spacing: -0.015em;
}

.section-head h2 em,
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
}

.section-head p {
  max-width: 38rem;
  margin: 0;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.script-bg {
  position: absolute;
  z-index: -1;
  top: -0.78em;
  left: -0.1em;
  color: var(--rose);
  opacity: 0.26;
  font: 400 clamp(4.6rem, 11vw, 9rem)/1 var(--font-script);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--sepia);
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
}

.ornament span {
  font: 600 0.68rem/1 var(--font-body);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* --------------------------------------------------------- Column accents */

.c-synthesis { --accent: var(--honey); --accent-deep: var(--honey-deep); --accent-wash: rgba(226, 174, 87, 0.16); }
.c-field-reports { --accent: var(--rose); --accent-deep: var(--rose-deep); --accent-wash: rgba(234, 162, 156, 0.18); }
.c-wards { --accent: var(--lavender); --accent-deep: var(--lavender-deep); --accent-wash: rgba(184, 172, 220, 0.2); }
.c-quest-log { --accent: var(--sky); --accent-deep: var(--sky-deep); --accent-wash: rgba(157, 187, 224, 0.2); }
.c-recipe-book { --accent: var(--sage); --accent-deep: var(--sage-deep); --accent-wash: rgba(169, 200, 168, 0.22); }
.c-atelier-notes { --accent: var(--peach); --accent-deep: var(--peach-deep); --accent-wash: rgba(241, 205, 178, 0.3); }
.c-unfiled { --accent: var(--knit); --accent-deep: var(--sepia); --accent-wash: rgba(235, 224, 210, 0.45); }

.cicon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cicon .ac {
  fill: var(--accent);
}

.column-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-deep);
  font: 650 0.7rem/1.4 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.column-chip .cicon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--ink);
}

/* ------------------------------------------------------------ Column cards */

.column-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.column-card {
  position: relative;
  height: 100%;
  min-height: 17.5rem;
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(14rem 9rem at 100% 0%, var(--accent-wash), transparent 70%),
    var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 200ms ease;
}

.column-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed var(--line);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}

.column-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 26px 44px -28px rgba(40, 48, 83, 0.5);
}

.column-card .numeral {
  position: absolute;
  top: 1.05rem;
  right: 1.35rem;
  color: var(--accent-deep);
  opacity: 0.55;
  font: 500 1.05rem/1 var(--font-caps);
  letter-spacing: 0.08em;
}

.column-card .icon-badge {
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1.35rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 0 0 5px var(--accent-wash);
}

.column-card .icon-badge .cicon {
  width: 1.7rem;
  height: 1.7rem;
}

.column-card .column-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent-deep);
  font: 650 0.68rem/1.4 var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.column-card h3 {
  margin: 0 0 0.6rem;
  font: 600 1.85rem/1.1 var(--font-display);
  letter-spacing: -0.01em;
}

.column-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.column-card p {
  margin: 0 0 1.3rem;
  color: var(--ink-2);
  font-size: 0.93rem;
  line-height: 1.65;
}

.column-card .column-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.column-card .column-foot b {
  color: var(--ink);
  font-weight: 600;
  transition: transform 220ms var(--ease);
}

.column-card:hover .column-foot b {
  transform: translateX(4px);
}

/* ------------------------------------------------------------ Entry cards */

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.entry-card {
  position: relative;
  min-height: 15rem;
  padding: 1.5rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 6px 6px var(--radius) var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 26px 44px -28px rgba(40, 48, 83, 0.5);
}

.entry-card h2,
.entry-card h3 {
  margin: 0.95rem 0 0.6rem;
  font: 600 1.55rem/1.15 var(--font-display);
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.entry-card :is(h2, h3) a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.entry-card :is(h2, h3) a:hover {
  color: var(--ink);
}

.entry-card p {
  margin: 0 0 1.2rem;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.65;
}

.entry-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.entry-meta > * + *::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 1rem;
  vertical-align: middle;
  background: var(--line-strong);
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------- Marquee */

.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid rgba(251, 247, 240, 0.12);
  background: var(--night);
  color: var(--cream);
  font: 500 1rem/1 var(--font-caps);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  padding: 1.15rem 1.1rem;
  white-space: nowrap;
}

.marquee-track span::after {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--honey);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

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

.site-footer {
  position: relative;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(3.5rem, 7vw, 5rem) 0 2rem;
  background: var(--night);
  color: var(--cream);
}

/* Scalloped hem, like the edge of a lace collar. */
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -15px;
  height: 16px;
  background: radial-gradient(circle at 15px 16px, var(--night) 14.5px, transparent 15px) 0 0 / 30px 16px repeat-x;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(251, 247, 240, 0.14);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1.3rem;
}

.footer-brand .seal {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  transform: rotate(-8deg);
}

.footer-brand .lockup {
  display: block;
  width: 228px;
  height: auto;
  margin: 0.4rem 0 0.9rem;
}

.footer-brand p {
  margin: 0;
  max-width: 22rem;
  color: var(--night-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0.4rem 0 1rem;
  color: var(--honey);
  font: 650 0.7rem/1.4 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--cream);
  opacity: 0.86;
  transition: opacity 150ms ease, color 150ms ease;
}

.site-footer a:hover {
  opacity: 1;
  color: var(--rose);
}

.footer-base {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  color: var(--night-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.footer-base .script {
  color: var(--rose);
  font: 400 1.35rem/1 var(--font-script);
  letter-spacing: 0;
}

/* ------------------------------------------------------------- Responsive */

@media (max-width: 1080px) {
  .column-grid,
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-header .wrap {
    min-height: 0;
    padding-block: 0.7rem;
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .brand img {
    height: 36px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 0.85rem;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .header-cta {
    margin-left: auto;
  }

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

  .column-card {
    min-height: 0;
  }

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

  .footer-brand {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .header-cta {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
