/* ==========================================================================
   callum.casa — "Salon" theme
   A traditional picture gallery: claret walls, gilt frames, brass plaques.
   Every colour, font and recurring measure lives in :root. See CLAUDE.md.
   ========================================================================== */

:root {
  /* Wall & frames */
  --wall: #5B1A20;                 /* claret gallery wall: the page colour, fixed */
  --wall-shade: rgba(0, 0, 0, 0.25); /* the recessed "canvas" inside a frame */
  --gilt: #C9A45A;                 /* frame, rail, plaque fill */
  --gilt-light: #E3C987;           /* highlights, eyebrows */
  --gilt-dark: #8F6E2E;            /* inner frame line, rail shadow — decorative only */

  /* Text */
  --cream: #F4EAD5;                /* primary text */
  --cream-muted: #D9C9A8;          /* secondary text */
  --ink-on-gilt: #2A0A0D;          /* text on plaques / selected filters */
  --rule: rgba(201, 164, 90, 0.45);/* section dividers */

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-pad: clamp(64px, 9vw, 96px);

  /* Hanging */
  --frame-post: 12px;
  --frame-photo: 9px;
  --shadow-hang: 0 18px 36px rgba(0, 0, 0, 0.35);
  --shadow-hang-sm: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--cream); }
a:hover { color: var(--gilt-light); }

/* Map bold to the real semibold cut (no faux bold). */
strong, b { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--gilt-light);
  outline-offset: 3px;
}

img { display: block; max-width: 100%; }

.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-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--gilt);
  color: var(--ink-on-gilt);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--ink-on-gilt); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --------------------------------------------------------------------------
   Shared pieces: eyebrows, frames, plaques, buttons
   -------------------------------------------------------------------------- */

/* Small, widely tracked capitals — the voice of engraved gallery signage. */
.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gilt-light);
}

/* A gilt frame. `ridge` gives a moulded, two-tone edge for free;
   the inset line adds the inner slip, the shadow lifts it off the wall. */
.frame {
  border: var(--frame-post) ridge var(--gilt);
  background: var(--wall-shade);
  box-shadow: inset 0 0 0 1px var(--gilt-dark), var(--shadow-hang);
}

/* A brass name plaque. */
.plaque {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  background: var(--gilt);
  color: var(--ink-on-gilt);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--gilt-light);
}

.button-outline {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid var(--gilt);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.button-outline:hover {
  background: var(--gilt);
  color: var(--ink-on-gilt);
}

/* --------------------------------------------------------------------------
   Header & picture rail
   -------------------------------------------------------------------------- */

.site-header {
  padding: 24px 16px;
  text-align: center;
}

/* The site's name, "Callum’s Casa", as the page's h1. Italic display face:
   reads like an artist's signature. */
.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.05;
  text-wrap: balance;
}

.picture-rail {
  height: 6px;
  background: var(--gilt);
  border-top: 1px solid var(--gilt-light);
  border-bottom: 1px solid var(--gilt-dark);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--rule);
}
/* The first section sits right under the picture rail, which is divider enough. */
.section:first-child { border-top: 0; }

.section__head { text-align: center; }

.section__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
}

.section__lede {
  margin: 14px 0 0;
  font-size: 1.125rem;
  color: var(--cream-muted);
}

.section__foot {
  margin-top: 56px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about { text-align: center; }
.about > * { max-width: 780px; margin-left: auto; margin-right: auto; }

.about__lead {
  margin-top: 24px;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.25;
}

.about__body {
  margin-top: 28px;
  margin-bottom: 0;
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--cream-muted);
}

/* The diamonds sit in the column gap rather than inside the items, so hiding
   one never changes how the row wraps. main.js hides the diamond on any item
   that starts a new line (.is-line-start). */
.interests {
  --separator-space: 49px; /* 22px either side of a 5px diamond */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px var(--separator-space);
  margin-top: 36px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gilt-light);
}
.interests li { position: relative; }
.interests li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--separator-space) / -2 - 2.5px);
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--gilt);
  transform: rotate(45deg);
}
.interests li.is-line-start::before { display: none; }

/* --------------------------------------------------------------------------
   Gallery — Callum's own recent photos
   -------------------------------------------------------------------------- */

/* Landscape frames: three across on wide screens, two on tablets, one on phones.
   Flex rather than grid, so a photo left alone on the last row hangs centred. */
.photo-grid {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 28px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.photo-grid > li {
  flex: 1 1 280px;
  max-width: 360px;
}
/* Wide enough for two across (2 × 280px + gap): cap each photo at half the row,
   so a third photo alone on its row stays the same size as the two above it. */
@container (min-width: 588px) {
  .photo-grid > li { max-width: min(360px, calc((100cqw - 28px) / 2)); }
}

.photo {
  margin: 0;
  text-align: center;
}

/* 3:2, the shape of a camera's landscape shot, so photos hang uncropped.
   (Phone shots are 4:3 and lose a sliver top and bottom.) */
.photo__frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: var(--frame-photo) ridge var(--gilt);
  background: var(--wall-shade);
  box-shadow: inset 0 0 0 1px var(--gilt-dark), var(--shadow-hang-sm);
}
.photo__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--tone, #6B3A3F);
}
.photo__placeholder svg {
  fill: none;
  stroke: var(--gilt-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo__caption {
  margin-top: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3125rem;
  line-height: 1.2;
}

.photo__date {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-muted);
}

/* --------------------------------------------------------------------------
   Journal — posts hung as framed "works on paper"
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.filters[hidden] { display: none; }

.filter {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--gilt);
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.filter:hover { color: var(--gilt-light); }
.filter[aria-pressed="true"] {
  background: var(--gilt);
  color: var(--ink-on-gilt);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 56px 40px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.post[hidden] { display: none; }

.post article {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.frame--post {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 260px;
  padding: 32px 28px;
  box-shadow: inset 0 0 0 1px var(--gilt-dark), 0 14px 28px rgba(0, 0, 0, 0.3);
}

.post__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.875rem;
  line-height: 1.12;
  text-wrap: balance;
}
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.post__excerpt {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--cream-muted);
}

.post .plaque { margin-top: 16px; }

.post__meta {
  margin: 10px 0 0;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--cream-muted);
}

.post-empty {
  margin: 48px 0 0;
  text-align: center;
  font-style: italic;
  color: var(--cream-muted);
}

/* --------------------------------------------------------------------------
   Holding page — index.html until launch: one framed "coming soon" notice.
   Delete this block once index.full.html replaces it.
   -------------------------------------------------------------------------- */

/* Footer pinned to the bottom of the window; the notice centred above it. */
.page--placeholder {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
/* Auto side margins would shrink these to their content in a flex column. */
.page--placeholder > .container { width: 100%; }
.page--placeholder main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.placeholder__frame {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 56px);
  text-align: center;
}
.placeholder__frame .section__lede { text-wrap: balance; }

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

.site-footer {
  padding: 22px 0 56px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

/* The Granada logo, small and quiet, signing off the page. */
.footer-logo {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  color: var(--gilt);
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
  :root {
    --frame-post: 10px;
    --frame-photo: 7px;
  }
  .frame--post { min-height: 0; padding: 28px 20px; }
  .interests { --separator-space: 33px; } /* 14px either side */
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button-outline, .filter { transition: none; }
}
