/* =========================================================================
   Jurnal d'Art — Design Tokens
   Pure white gallery aesthetic. Strict palette. One serif typeface.
   ========================================================================= */

/* Self-hosted Cormorant Garamond — full weight + italic set.
   Files live in /fonts. Paths are relative to this stylesheet's location
   at the project root. font-display: swap for resilient first paint. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 300; font-display: swap;
  src: url("fonts/CormorantGaramond-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic; font-weight: 300; font-display: swap;
  src: url("fonts/CormorantGaramond-LightItalic.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/CormorantGaramond-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/CormorantGaramond-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/CormorantGaramond-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic; font-weight: 500; font-display: swap;
  src: url("fonts/CormorantGaramond-MediumItalic.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/CormorantGaramond-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic; font-weight: 600; font-display: swap;
  src: url("fonts/CormorantGaramond-MediumItalic.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/CormorantGaramond-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic; font-weight: 700; font-display: swap;
  src: url("fonts/CormorantGaramond-Italic.ttf") format("truetype");
}

:root {
  /* ---------- Colors ----------
     The brief is strict: white background, near-black text, charcoal CTA,
     pale rose announcement, deep red announcement text.
     Do NOT add tinted neutrals here. */

  --bg-1:           #FFFFFF;   /* page background, only background */
  --fg-1:           #1A1A1A;   /* primary text, borders, inactive chip border */
  --fg-2:           rgba(26, 26, 26, 0.55);  /* dimmed text — captions, meta. Achieved via opacity, not a tinted gray. */

  --cta-fill:       #2E2E2E;   /* filled CTA background */
  --cta-fill-hover: #000000;   /* filled CTA hover */
  --cta-fill-text:  #FFFFFF;   /* text on filled CTA */

  --cta-outline-bg:     #FFFFFF;   /* outline CTA background */
  --cta-outline-border: #1A1A1A;   /* outline CTA border */
  --cta-outline-text:   #1A1A1A;   /* outline CTA text */

  --announce-bg:    #FBE9E7;   /* announcement banner background — pale rose */
  --announce-fg:    #B71C1C;   /* announcement banner text — deep red */

  /* ---------- Type ----------
     One classical serif carries the whole site. Differentiate by
     weight, size, case, and letter-spacing — never by adding a second face. */

  --serif-display: "Cormorant Garamond", "Fraunces", "EB Garamond", Georgia, serif;
  --serif-body:    "Cormorant Garamond", "Fraunces", "EB Garamond", Georgia, serif;

  /* Type scale (px). Display sizes use clamp() in semantic tokens below. */
  --fs-12: 12px;
  --fs-13: 13px;   /* nav, artwork titles */
  --fs-14: 14px;
  --fs-17: 17px;   /* body min */
  --fs-18: 18px;   /* body default */
  --fs-22: 22px;
  --fs-28: 28px;
  --fs-40: 40px;
  --fs-56: 56px;
  --fs-72: 72px;
  --fs-96: 96px;

  --lh-tight: 1.05;
  --lh-snug:  1.2;
  --lh-body:  1.6;

  --tracking-tight:  -0.01em;
  --tracking-normal:  0;
  --tracking-wide:    0.1em;     /* nav, artwork titles, uppercase labels */

  /* ---------- Spacing (8px base, big jumps) ---------- */
  --space-1:   8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  40px;
  --space-5:  64px;
  --space-6:  96px;
  --space-7: 128px;
  --space-8: 192px;

  --max-content: 1200px;
  --pad-inline-mobile:  24px;
  --pad-inline-desktop: 48px;

  /* ---------- Motion ---------- */
  --ease-soft:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-quick:    120ms;
  --dur-medium:   240ms;
  --dur-hover:    400ms;

  /* ---------- Borders & radius ---------- */
  --hairline: 1px solid var(--fg-1);
  --radius-0: 0;
  --radius-pill: 9999px;  /* used ONLY on the chat-widget icon */
}

/* =========================================================================
   Semantic type tokens — apply directly to elements.
   These exist so designers don't reach for arbitrary sizes.
   ========================================================================= */

.type-display {
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(48px, 8vw, var(--fs-96));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}

.type-section-label {
  /* "the galleries", "about", "contact" — lowercase, large, quiet. */
  font-family: var(--serif-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(32px, 5vw, var(--fs-56));
  line-height: var(--lh-snug);
  text-transform: lowercase;
  letter-spacing: var(--tracking-normal);
  color: var(--fg-1);
}

.type-h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, var(--fs-72));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}

.type-h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: var(--fs-40);
  line-height: var(--lh-snug);
  color: var(--fg-1);
}

.type-h3 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: var(--fs-28);
  line-height: var(--lh-snug);
  color: var(--fg-1);
}

.type-nav,
.type-artwork-title {
  /* Uppercase serif, wide-tracked. Used for nav links AND artwork titles. */
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: var(--fs-13);
  line-height: var(--lh-snug);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--fg-1);
}

.type-body {
  font-family: var(--serif-body);
  font-weight: 400;
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  color: var(--fg-1);
}

.type-body-sm {
  font-family: var(--serif-body);
  font-weight: 400;
  font-size: var(--fs-17);
  line-height: var(--lh-body);
  color: var(--fg-1);
}

.type-caption {
  /* Artwork meta: "Oil on linen, 130 × 97 cm" */
  font-family: var(--serif-body);
  font-weight: 400;
  font-style: italic;
  font-size: var(--fs-14);
  line-height: var(--lh-snug);
  color: var(--fg-2);
}

.type-announce {
  font-family: var(--serif-body);
  font-weight: 500;
  font-size: var(--fs-14);
  line-height: var(--lh-snug);
  letter-spacing: 0.02em;
  color: var(--announce-fg);
}

/* =========================================================================
   Base reset (lightweight — for use within UI kit only).
   ========================================================================= */

.jda-base,
.jda-base * {
  box-sizing: border-box;
}

.jda-base {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--serif-body);
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.jda-base a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--dur-quick) var(--ease-soft);
}
.jda-base a:hover { opacity: 0.55; }

/* =========================================================================
   Component primitives (reusable across UI kit + slides).
   ========================================================================= */

/* Filled CTA -------------------------------------------------------------- */
.jda-btn-fill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cta-fill);
  color: var(--cta-fill-text);
  border: 0;
  border-radius: var(--radius-0);
  padding: 14px 28px;
  font-family: var(--serif-display);
  font-size: var(--fs-13);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-quick) var(--ease-soft);
}
.jda-btn-fill:hover  { background: var(--cta-fill-hover); opacity: 1; }
.jda-btn-fill:active { background: var(--cta-fill-hover); opacity: 0.9; }

/* Outline CTA ------------------------------------------------------------- */
.jda-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cta-outline-bg);
  color: var(--cta-outline-text);
  border: 1px solid var(--cta-outline-border);
  border-radius: var(--radius-0);
  padding: 13px 27px; /* compensates 1px border so visual height matches fill */
  font-family: var(--serif-display);
  font-size: var(--fs-13);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-medium) var(--ease-soft),
              color var(--dur-medium) var(--ease-soft);
}
.jda-btn-outline:hover,
.jda-btn-outline:active {
  background: var(--fg-1);
  color: var(--cta-fill-text);
  opacity: 1;
}

/* Filter chip ------------------------------------------------------------- */
.jda-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: var(--cta-outline-bg);
  color: var(--fg-1);
  border: 1px solid var(--fg-1);
  border-radius: var(--radius-0);
  padding: 8px 18px;
  font-family: var(--serif-display);
  font-size: var(--fs-13);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 500;
  cursor: pointer;
}
.jda-chip[aria-pressed="true"],
.jda-chip.is-active {
  background: var(--fg-1);
  color: var(--cta-fill-text);
}

/* Announcement banner ----------------------------------------------------- */
.jda-announce {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--announce-bg);
  color: var(--announce-fg);
  padding: 10px 24px;
  text-align: center;
  font-family: var(--serif-body);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Field (single-line, bottom-rule only) ----------------------------------- */
.jda-field {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--fg-1);
  border-radius: var(--radius-0);
  padding: 12px 0;
  font-family: var(--serif-body);
  font-size: var(--fs-18);
  color: var(--fg-1);
  outline: none;
}
.jda-field::placeholder {
  color: var(--fg-2);
  font-style: italic;
}

/* Artwork thumb (image + caption stack) ----------------------------------- */
.jda-thumb {
  display: block;
  cursor: pointer;
}
.jda-thumb__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #F2F2F2; /* placeholder neutral if no image — kept intentionally cool, not warm */
}
.jda-thumb__img > img,
.jda-thumb__img > image-slot,
.jda-thumb__img > .jda-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-hover) var(--ease-soft);
}
.jda-thumb:hover .jda-thumb__img > img,
.jda-thumb:hover .jda-thumb__img > image-slot,
.jda-thumb:hover .jda-thumb__img > .jda-placeholder {
  transform: scale(1.02);
}
.jda-thumb__title {
  margin-top: 16px;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: var(--fs-13);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--fg-1);
}
.jda-thumb__meta {
  margin-top: 4px;
  font-family: var(--serif-body);
  font-style: italic;
  font-size: var(--fs-14);
  color: var(--fg-2);
}

/* Sticky chat widget icon ------------------------------------------------- */
.jda-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cta-fill);
  color: var(--cta-fill-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  z-index: 100;
}
.jda-chat:hover { background: var(--cta-fill-hover); opacity: 1; }

/* Hamburger / close glyph ------------------------------------------------- */
.jda-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  color: var(--fg-1);
}
