/* ==========================================================================
   raghavsachin.com — shared styles

   Every page loads this one file. Change a colour, size, or spacing here and
   it updates everywhere, so you never have to edit eight files to adjust one
   thing. Page-specific rules are grouped under headings below.
   ========================================================================== */

/* Palette. A darkroom rather than a tech black: warm ink, warm paper, one wash of light. */
:root {
  --ink: #0A0908;
  --paper: #F2ECE3;
  --paper-soft: #C7BFB4;
  --dim: #857D76;
  --rule: rgba(242, 236, 227, 0.15);
  --rule-strong: rgba(242, 236, 227, 0.45);
  --glow: rgba(214, 176, 140, 0.16);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper-soft);
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Links inherit the surrounding text colour unless a specific rule overrides it */
a { color: inherit; }

/* Keyboard users need to see where they are on the page */
a:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 4px;
}

/* ==========================================================================
   Entry page (index.html): full-bleed collage behind the type
   ========================================================================== */

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: 8vw 6vw;
}

/* object-fit cover behaves whether the collage is wide, tall, or square.
   Raise the blur to give away less of the photograph, lower it to give away more. */
.collage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(13px) brightness(0.46) saturate(0.85);
}

/* Warm light in the middle, darkness at the edges. Holds the eye on the type. */
.safelight {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 46%, var(--glow) 0%, rgba(10, 9, 8, 0.72) 55%, rgba(10, 9, 8, 0.94) 100%);
}

.entry-words {
  position: relative;
  text-align: center;
  max-width: 26rem;
}

.entry-title {
  margin: 0 0 1.1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.3rem, 7.5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--paper);
}

.entry-sub {
  margin: 0 auto clamp(2.2rem, 6vh, 3.4rem);
  max-width: 21rem;
  font-size: 15px;
  color: var(--dim);
}

/* ==========================================================================
   Shared small pieces
   ========================================================================== */

/* Small letterspaced label that sits above a title */
.eyebrow {
  margin: 0 0 clamp(1.4rem, 4vh, 2.2rem);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--dim);
}

/* The single button on the entry page */
.enter {
  display: inline-block;
  padding: 13px 42px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 350ms ease, border-color 350ms ease;
}

.enter:hover {
  background-color: rgba(242, 236, 227, 0.07);
  border-color: var(--paper);
}

/* ==========================================================================
   Hub and content pages: one readable column
   ========================================================================== */

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 5.5rem) 1.5rem clamp(4rem, 12vh, 7rem);
}

/* Wider variant, used by the memories gallery so photos have room */
.wrap.wide { max-width: 52rem; }

/* Quiet link back to the hub. Sits above the title on every content page. */
.back {
  display: inline-block;
  margin-bottom: clamp(2.4rem, 7vh, 3.6rem);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 300ms ease;
}

.back:hover { color: var(--paper); }

.page-title {
  margin: 0 0 1.2rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--paper);
}

/* One line of framing directly under a page title */
.lede {
  margin: 0 0 clamp(2.2rem, 6vh, 3.2rem);
  font-size: 18px;
  color: var(--dim);
}

.wrap p { margin: 0 0 1.35rem; }

.wrap h2 {
  margin: clamp(2.2rem, 6vh, 3.2rem) 0 1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.65rem;
  line-height: 1.2;
  color: var(--paper);
}

/* Placeholder copy. Delete the class attribute once the real writing is in. */
.todo {
  padding: 1rem 1.3rem;
  border-left: 2px solid var(--rule-strong);
  color: var(--dim);
  font-style: italic;
}

/* ==========================================================================
   Hub list (hub.html)
   ========================================================================== */

.hub-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.hub-list li { border-bottom: 1px solid var(--rule); }

.hub-list a {
  display: block;
  padding: 1.5rem 0;
  text-decoration: none;
  transition: padding-left 350ms ease;
}

.hub-list a:hover { padding-left: 0.7rem; }

.hub-title {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--paper);
}

.hub-note {
  display: block;
  margin-top: 0.15rem;
  font-size: 14px;
  color: var(--dim);
}

/* ==========================================================================
   Memories gallery (memories.html)
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 2rem;
}

/* Each tile stays square no matter the shape of the photo inside it */
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(242, 236, 227, 0.04);
  font-size: 12px;
  color: var(--dim);
  text-align: center;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
