/* ==========================================================================
   Kalso — kalso.co.uk
   Bespoke jewellery and crafts, handmade in South Wales.

   A static page. No build step, no dependencies, no CDN — the two fonts are
   self-hosted in /fonts, so nothing here phones home.

   The palette and the geometry are both lifted straight from the logo: three
   equilateral triangles in rose, sage and cream. Those same three triangles
   are used through the page to stand for the three things Kalso makes.
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────── */

/* Latin subsets of the Google Fonts variable builds, served from /fonts.
   Axes: Fraunces opsz/wght/SOFT/WONK, Jost wght. */
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('fonts/jost.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────────────────────── */

:root {
  /* Sampled from Branding/Logo/kalso-logo.png */
  --rose:       #e9beb4;
  --sage:       #9fbcc1;
  --cream:      #efe3dc;

  /* The logo rose, darkened until it clears 4.5:1 both as a button fill
     (paper text on it) and as link text on the warm panel. */
  --rose-deep:  #8d5649;
  --cream-mark: #dcc7b8;   /* the logo cream vanishes on paper at small sizes */

  --paper:      #faf6f2;
  --paper-warm: #f4ece5;
  --ink:        #191817;
  --ink-soft:   #55504c;
  --hair:       #e0d5cb;   /* rules and edges */

  --wrap:  1240px;
  --gut:   clamp(1.25rem, 5vw, 4rem);
  --pad-y: clamp(5rem, 11vw, 10.5rem);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:  'Jost', 'Futura', 'Avenir Next', 'Century Gothic', sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);

  color-scheme: light;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: 'SOFT' 22, 'WONK' 0, 'opsz' 16;
  font-size: clamp(1.0625rem, .45vw + .96rem, 1.1875rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Paper grain. Fixed, so it reads as the surface rather than as content. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--rose-deep);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection { background: var(--rose); color: var(--ink); }

/* ── Typography ────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 350;
  line-height: 1.06;
  letter-spacing: -.018em;
  text-wrap: balance;
  font-variation-settings: 'SOFT' 48, 'WONK' 1, 'opsz' 144;
}

h1 { font-size: clamp(2.1rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(2.05rem, 4.3vw, 3.5rem); }
h3 {
  font-size: clamp(1.3rem, 1.5vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -.008em;
  font-variation-settings: 'SOFT' 40, 'WONK' 0, 'opsz' 40;
}

p { text-wrap: pretty; }

.lede {
  font-size: clamp(1.08rem, .7vw + 1rem, 1.4rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34ch;
}

.prose { max-width: 46ch; color: var(--ink-soft); }
.prose p + p { margin-top: 1.15em; }

/* Small caps furniture — the geometric sans nods to the logo's wordmark. */
.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: .75em;
  margin-bottom: 1.6rem;
}
.eyebrow::before {
  content: '';
  flex: none;
  width: 13px;
  aspect-ratio: 1.1547;         /* equilateral */
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: var(--rose);
}
.eyebrow--sage::before { background: var(--sage); }

.sign {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 40;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 1.8rem;
}
.sign::before {
  content: '';
  display: block;
  width: 42px;
  height: 1px;
  background: var(--hair);
  margin-bottom: 1.1rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  --bg: var(--ink);
  --fg: var(--paper);
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg);
  padding: 1.05em 2.1em;
  border: 1px solid var(--ink);
  transition: background .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover {
  --bg: var(--rose-deep);
  border-color: var(--rose-deep);
  transform: translateY(-2px);
}
.btn--ghost {
  --bg: transparent;
  --fg: var(--ink);
  border-color: var(--hair);
}
.btn--ghost:hover {
  --bg: transparent;
  --fg: var(--rose-deep);
  border-color: var(--rose-deep);
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-head {
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand img {
  width: clamp(96px, 11vw, 132px);
  height: auto;
}

.head-social {
  display: flex;
  gap: clamp(1.1rem, 2.5vw, 2rem);
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.head-social a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: .35em;
  border-bottom: 1px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.head-social a:hover { color: var(--ink); border-bottom-color: var(--rose); }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) var(--pad-y);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.hero h1 { margin-bottom: 1.7rem; }
.hero .lede { margin-bottom: 2.6rem; }

.hero__art {
  position: relative;
  isolation: isolate;
}
.hero__art img {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 74vh;              /* keeps the call to action above the fold */
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* A rose triangle standing on the foot of the photograph. Opaque, overlapping —
   the same move the logo itself makes with its three shapes. */
.hero__art .tri {
  position: absolute;
  z-index: 2;
  width: 36%;
  aspect-ratio: 1.1547;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  right: -9%;                    /* over plain fabric, clear of the necklace */
  bottom: 0;
}
.tri--rose { background: var(--rose); }

/* ── The studio ────────────────────────────────────────────────────────── */

.studio {
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
  padding-block: var(--pad-y);
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
}
.studio__art img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;   /* tools at the top, clear paper below */
}
.studio h2 { margin-bottom: 1.9rem; }

/* ── Full-bleed band ───────────────────────────────────────────────────── */

.band {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(340px, 56vh, 620px);
  overflow: hidden;
}
.band img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(25,24,23,.16), rgba(25,24,23,.44));
}
.band__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'SOFT' 70, 'WONK' 1, 'opsz' 144;
  font-size: clamp(1.9rem, 4.6vw, 3.7rem);
  line-height: 1.16;
  letter-spacing: -.015em;
  text-align: center;
  color: var(--paper);
  padding-inline: var(--gut);
  text-shadow: 0 1px 30px rgba(25, 24, 23, .3);
}

/* ── What Kalso makes ──────────────────────────────────────────────────── */

.makes {
  position: relative;
  isolation: isolate;
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
  padding-block: var(--pad-y);
  overflow: clip;
}

/* The logo's own three triangles, staged large and faint behind the three
   things they stand for. */
.makes__tri {
  position: absolute;
  z-index: -1;
  bottom: clamp(2rem, 8vw, 7rem);
  left: 50%;
  translate: -50% 0;
  width: min(115%, 1000px);
  height: auto;
  opacity: .1;                   /* a watermark, not a background — copy sits over it */
}

.makes__head { margin-bottom: clamp(3rem, 6vw, 5rem); max-width: 30ch; }

.makes__list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.25rem, 4.5vw, 4rem);
}
.make h3 { margin-bottom: .9rem; }
.make p { color: var(--ink-soft); font-size: 1rem; line-height: 1.62; }

.make__mark {
  display: block;
  width: 34px;
  aspect-ratio: 1.1547;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  margin-bottom: 1.5rem;
  transition: translate .5s var(--ease);
}
.make__mark--rose  { background: var(--rose); }
.make__mark--sage  { background: var(--sage); }
.make__mark--cream { background: var(--cream-mark); }
.make:hover .make__mark { translate: 0 -5px; }

/* ── Gallery ───────────────────────────────────────────────────────────── */

.gallery {
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
  padding-block: var(--pad-y);
}
.gallery__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
  column-gap: clamp(1rem, 2.5vw, 2.25rem);
  row-gap: clamp(2.5rem, 5vw, 4.5rem);
}

.g { position: relative; overflow: hidden; }
.g img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: scale .9s var(--ease), filter .9s var(--ease);
}
.g:hover img { scale: 1.035; filter: saturate(1.06); }

.g figcaption {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 1.1rem;
}

/* An editorial stagger rather than a tidy 2×2. */
.g:nth-of-type(1) { grid-column: 1 / span 7; }
.g:nth-of-type(1) img { aspect-ratio: 4 / 3; }

.g:nth-of-type(2) { grid-column: 9 / span 4; margin-top: clamp(0rem, 5vw, 4.5rem); }
.g:nth-of-type(2) img { aspect-ratio: 3 / 4; }

.g:nth-of-type(3) { grid-column: 2 / span 4; }
.g:nth-of-type(3) img { aspect-ratio: 3 / 4; }

.g:nth-of-type(4) { grid-column: 7 / span 6; margin-top: clamp(0rem, 4vw, 3.5rem); }
.g:nth-of-type(4) img { aspect-ratio: 4 / 3; }

/* ── Press ─────────────────────────────────────────────────────────────── */

.press {
  width: min(100% - 2 * var(--gut), 46rem);
  margin-inline: auto;
  padding-block: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
.press__text { flex: 0 1 auto; }   /* keeps the line intact when the rules stack */
.press cite { font-style: italic; letter-spacing: .12em; }
.press__rule { flex: 1 1 auto; height: 1px; background: var(--hair); }

/* ── Contact ───────────────────────────────────────────────────────────── */

.hello {
  padding-block: var(--pad-y);
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--paper-warm);
  border-top: 1px solid var(--hair);
}
.hello__inner {
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
  max-width: 62rem;
}
.hello h2 { margin-bottom: 1.7rem; max-width: 18ch; }
.hello .lede { max-width: 44ch; margin-bottom: 2.8rem; }

.hello__links {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 3rem;
}

.hello__where {
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-foot {
  background: var(--paper-warm);
  padding: 0 var(--gut) clamp(2.5rem, 5vw, 4rem);
  display: grid;
  place-items: center;
  gap: 1.4rem;
  text-align: center;
}
.foot-mark { width: 46px; height: auto; opacity: .9; }
.site-foot p {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Motion ────────────────────────────────────────────────────────────── */

/* Hero: a single orchestrated entrance on load. */
.js .stage {
  opacity: 0;
  animation: rise .95s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Everything below the fold: reveal on approach. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .95s var(--ease) var(--d, 0ms),
              transform .95s var(--ease) var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js .stage,
  .js [data-reveal] { opacity: 1; transform: none; animation: none; }
  .g:hover img { scale: 1; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

/* Three columns hold all the way down — two would orphan the third. */
@media (max-width: 62rem) {
  .makes__list { gap: 1.75rem; }
  .makes__tri  { opacity: .085; }
}

@media (max-width: 48rem) {
  .hero,
  .studio {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero { padding-block: 1rem var(--pad-y); }

  /* Photograph first on the studio row, type after — reads better stacked. */
  .studio__art { order: -1; }
  /* The tall crop is mostly empty paper; stacked, that is just dead scroll. */
  .studio__art img { aspect-ratio: 4 / 3; }

  .hero__art { max-width: 26rem; }
  .hero__art .tri { width: 42%; }

  .makes__list { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }

  .gallery__grid { grid-template-columns: minmax(0, 1fr); }
  .g:nth-of-type(n) {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .g:nth-of-type(n) img { aspect-ratio: 4 / 3; }

  .press { flex-direction: column; gap: 1.25rem; }
  .press__rule { width: 60px; flex: none; }
}

@media (max-width: 30rem) {
  /* Both channels stay — Facebook is where she actually gets messaged. */
  .head-social { gap: .9rem; font-size: .66rem; letter-spacing: .12em; }
  .brand img { width: 84px; }
  .btn { padding: 1em 1.6em; letter-spacing: .12em; }
  .hello__links { flex-direction: column; align-items: flex-start; }
  .hello__links .btn { width: 100%; text-align: center; }
}
