/* Named for a President — heritage editorial. Cream paper, ink, saffron ritual. */

@font-face {
  font-family: "Ivy Ora Display";
  src: url("../assets/fonts/IvyOraDisplay-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ivy Ora Display";
  src: url("../assets/fonts/IvyOraDisplay-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

:root {
  --cream: #faf5ef;
  --sand: #f2e8db;
  --ink: #2b2825;
  --ink-deep: #1e1b18;
  --saffron: #d97200;
  --saffron-deep: #8a4a02;
  --ghee: #efae57;
  --serif: "Ivy Ora Display", Georgia, serif;
  --body: "Martel", Georgia, serif;
  --hand: "Kalam", cursive;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 62ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; }

.scheme-ink { background: var(--ink-deep); color: var(--cream); }
.scheme-sand { background: var(--sand); }
.scheme-saffron { background: var(--saffron); color: var(--ink-deep); }

.mark {
  display: inline-block;
  background: var(--ink);
  -webkit-mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
}

.lnk {
  color: var(--saffron-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--saffron);
  transition: color 0.25s, border-color 0.25s;
}
.lnk:hover { color: var(--saffron); }
.scheme-ink .lnk { color: var(--ghee); border-color: var(--ghee); }

/* ---- chapter marks ---- */
.chapter {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  color: var(--saffron-deep);
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.scheme-ink .chapter { color: var(--ghee); }
.scheme-saffron .chapter { color: var(--ink-deep); }
.chapter::before {
  content: "";
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  background: currentColor;
  -webkit-mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
}
.chapter::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.25; }

/* ---- masthead ---- */
.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.3rem var(--gutter) 0;
  text-align: center;
}
.masthead__home .mark { width: 2.3rem; height: 2.3rem; }
.masthead__line {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--saffron-deep);
}

/* ---- opening ---- */
.open {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem var(--gutter) 3rem;
  position: relative;
}
.open__mandala {
  width: clamp(9rem, 22vw, 15rem);
  height: clamp(9rem, 22vw, 15rem);
  background: var(--saffron);
  -webkit-mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  animation: turn 90s linear infinite;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}
@keyframes turn { to { transform: rotate(360deg); } }
.open__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.6vw, 4.4rem);
  line-height: 1.16;
  letter-spacing: 0.005em;
}
.open__title span { display: block; }
.open__l2 {
  font-style: italic;
  font-weight: 300;
  color: var(--saffron-deep);
}
.open__tag {
  margin-top: 1.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(43, 40, 37, 0.72);
}
.open__cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  width: 1px;
  height: 3.2rem;
  background: var(--ink);
  opacity: 0.5;
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); transform-origin: top; }
  46% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- the name ---- */
.name { position: relative; overflow: clip; padding-bottom: clamp(4rem, 9vw, 8rem); }
.name::after {
  content: "";
  position: absolute;
  right: -12%;
  top: 8%;
  width: min(60vw, 34rem);
  aspect-ratio: 1;
  background: var(--cream);
  opacity: 0.05;
  -webkit-mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  pointer-events: none;
}
.name__inner {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0;
  max-width: calc(var(--measure) + 2 * var(--gutter));
}
.name__lede {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.6;
  max-width: var(--measure);
}
.name__pull {
  margin: clamp(2.5rem, 5vw, 4rem) 0;
  padding-left: clamp(1.4rem, 3vw, 2.4rem);
  border-left: 1px solid var(--saffron);
}
.name__pull p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.35;
  color: var(--ghee);
}
.name__body { max-width: var(--measure); color: #e6ddd2; }
.name__body em { color: var(--ghee); }

/* ---- the years ---- */
.years { background: var(--cream); }
.years__pin { min-height: 100svh; display: flex; align-items: center; }
.years__stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  width: 100%;
  padding: clamp(2rem, 4vw, 3rem) var(--gutter);
}
.years__num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4.5rem, 14vw, 11rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.years__panels { position: relative; }
.era { transition: opacity 0.4s ease; }
body.js .era { position: absolute; inset: 0; opacity: 0; display: flex; flex-direction: column; justify-content: center; }
body.js .era.is-active { opacity: 1; }
body.js .years__panels { min-height: min(64svh, 34rem); }
.era__imgs { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 0.8rem; align-items: start; }
.era__imgs img { width: 100%; height: clamp(11rem, 30vw, 19rem); object-fit: cover; }
.era__imgs img:last-child { margin-top: clamp(1.2rem, 3vw, 2.4rem); }
.era__caption {
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--saffron-deep);
  margin-top: 0.7rem;
  transform: rotate(-1.2deg);
}
.era__text { margin-top: 0.5rem; max-width: 52ch; }
/* no-JS: the eras stack as plain chapters with their year restored */
body:not(.js) .years__num { display: none; }
body:not(.js) .era { margin-bottom: 3rem; }
body:not(.js) .era::before {
  content: attr(data-year);
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--saffron-deep);
  display: block;
  margin-bottom: 0.6rem;
}
@media (max-width: 820px) {
  .years__stage { grid-template-columns: 1fr; gap: 1rem; }
  .years__num { font-size: clamp(3.4rem, 16vw, 5.5rem); }
  body.js .years__panels { min-height: 66svh; }
}

/* ---- the rooms ---- */
.rooms { padding-bottom: clamp(4rem, 8vw, 7rem); }
.rooms__feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0;
}
.arch { position: relative; }
.arch img {
  width: 100%;
  height: clamp(20rem, 46vw, 30rem);
  object-fit: cover;
  border-radius: 50% 50% 2px 2px / 28% 28% 2px 2px;
}
.rooms__caption {
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--saffron-deep);
  margin-top: 0.8rem;
  transform: rotate(-1deg);
  text-align: center;
}
.rooms__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
}
.rooms__addr { font-style: normal; margin-top: 1.4rem; line-height: 1.8; }
.rooms__fact { margin-top: 1.2rem; font-weight: 600; }
.rooms__actions { display: flex; gap: 1.6rem; margin-top: 1.6rem; }
.rooms__index { list-style: none; margin: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0; }
.rooms__index li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(43, 40, 37, 0.16);
}
.rooms__index li:last-child { border-bottom: 1px solid rgba(43, 40, 37, 0.16); }
.rooms__index li span:first-child { font-weight: 600; }
.rooms__index li span:nth-child(2) { color: rgba(43, 40, 37, 0.66); font-size: 0.92em; }
.rooms__index li span:last-child { font-family: var(--serif); color: var(--saffron-deep); }
.rooms__note {
  margin: 1.4rem var(--gutter) 0;
  font-size: 0.86rem;
  color: rgba(43, 40, 37, 0.7);
  max-width: var(--measure);
}
@media (max-width: 820px) {
  .rooms__feature { grid-template-columns: 1fr; }
}

/* ---- the table ---- */
.table { padding-bottom: clamp(4rem, 8vw, 7rem); }
.table__list { padding: clamp(2rem, 4vw, 3.5rem) var(--gutter) 0; }
.course {
  display: grid;
  grid-template-columns: clamp(6rem, 14vw, 10rem) minmax(0, 1fr);
  gap: clamp(1.4rem, 3.5vw, 3rem);
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-top: 1px solid rgba(43, 40, 37, 0.16);
}
.course:last-child { border-bottom: 1px solid rgba(43, 40, 37, 0.16); }
.course__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(74, 46, 12, 0.18));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.course:hover .course__img { transform: scale(1.06) rotate(-2deg); }
.course__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}
.course__tags {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--saffron-deep);
  margin-top: 0.4rem;
}
.course__desc { margin-top: 0.5rem; max-width: 56ch; }
.table__note {
  margin: 1.8rem var(--gutter) 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: rgba(43, 40, 37, 0.85);
}

/* ---- the hands ---- */
.hands { padding-bottom: clamp(4rem, 8vw, 7rem); }
.hands__founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0;
}
.founder__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
}
.founder__role {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--saffron-deep);
  margin-top: 0.5rem;
}
.founder__bio { margin-top: 0.9rem; max-width: 44ch; }
.hands__ethic { padding: clamp(3rem, 6vw, 5rem) var(--gutter) 0; }
.hands__ethic-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.ethic { max-width: 56rem; }
.ethic__row {
  display: grid;
  grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-top: 1px solid rgba(43, 40, 37, 0.16);
}
.ethic__row:last-child { border-bottom: 1px solid rgba(43, 40, 37, 0.16); }
.ethic__row dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12em;
  color: var(--saffron-deep);
}
.ethic__row dd { max-width: 56ch; }
@media (max-width: 720px) {
  .hands__founders { grid-template-columns: 1fr; }
  .ethic__row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---- the record ---- */
.record { overflow: clip; padding-bottom: clamp(4rem, 8vw, 7rem); }
.awards { margin-top: clamp(2rem, 4vw, 3.5rem); overflow: hidden; }
.awards__row {
  display: flex;
  gap: 1.2rem;
  width: max-content;
  padding: 0 1.2rem;
}
.awards__row img {
  height: clamp(11rem, 24vw, 17rem);
  width: auto;
  filter: saturate(0.95);
}
body:not(.js) .awards { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.press { list-style: none; padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0; }
.press__item {
  padding: 1.4rem 0;
  border-top: 1px solid rgba(250, 245, 239, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
}
.press__item:last-child { border-bottom: 1px solid rgba(250, 245, 239, 0.16); }
.press__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  color: var(--ghee);
  line-height: 1.35;
}
.press__src {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cfc4b6;
}
@media (max-width: 720px) {
  .press__item { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---- the invitation ---- */
.invite { padding-bottom: clamp(4rem, 8vw, 7rem); }
.invite__inner { padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0; max-width: 62rem; }
.invite__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.06;
}
.invite__body { margin-top: 1.4rem; font-weight: 600; }
.invite__formats { list-style: none; margin-top: 1.2rem; max-width: 46rem; }
.invite__formats li {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(30, 27, 24, 0.28);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
}
.invite__formats li:last-child { border-bottom: 1px solid rgba(30, 27, 24, 0.28); }
.invite__cta {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  color: var(--ink-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--ink-deep);
  padding-bottom: 0.2rem;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.invite__cta:hover { color: var(--cream); border-color: var(--cream); transform: translateY(-2px); }

/* ---- footer ---- */
.foot { padding: clamp(3rem, 6vw, 5rem) var(--gutter) 2.5rem; }
.mark--foot {
  width: 8rem;
  height: 6.2rem;
  background: var(--cream);
  -webkit-mask: url("../assets/img/Footer-logo.svg") center / contain no-repeat;
  mask: url("../assets/img/Footer-logo.svg") center / contain no-repeat;
}
.foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  max-width: 46rem;
}
.foot__h {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ghee);
  margin-bottom: 0.8rem;
}
.foot__col a {
  display: block;
  color: #d8cec2;
  text-decoration: none;
  padding: 0.24rem 0;
  font-size: 0.95rem;
}
.foot__col a:hover { color: var(--ghee); }
.foot__legal {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(250, 245, 239, 0.12);
  font-size: 0.78rem;
  color: rgba(216, 206, 194, 0.7);
  max-width: 68ch;
}

/* ================= multi-page additions ================= */

/* masthead nav */
.masthead__nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 0.4rem;
}
.masthead__nav a {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(43, 40, 37, 0.75);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
  transition: color 0.25s, border-color 0.25s;
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a[aria-current="page"] { color: var(--saffron-deep); border-color: var(--saffron); }

/* subpage masthead sits in flow on cream */
.masthead--page { position: static; padding-bottom: 1.6rem; border-bottom: 1px solid rgba(43, 40, 37, 0.12); }

/* subpage opener */
.pageopen {
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) 0;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  text-align: center;
}
.pageopen__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.05;
}
.pageopen__sub {
  margin: 1.2rem auto 0;
  max-width: 54ch;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}
.pageopen__contacts { margin-top: 1.2rem; }

/* home: link out of the years chapter */
.years__more { padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem); }

/* invitation with two doors (home) */
.invite__row { display: flex; gap: 2.5rem; flex-wrap: wrap; }

/* the hands: early-days photo */
.hands__photo { padding: clamp(2rem, 4vw, 3rem) var(--gutter) clamp(3rem, 6vw, 5rem); max-width: 52rem; }
.hands__photo img { width: 100%; height: clamp(14rem, 32vw, 22rem); object-fit: cover; }

/* contact: room gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  padding: clamp(2rem, 4vw, 3rem) var(--gutter) 0;
}
.gallery__item img,
.gallery__blank {
  width: 100%;
  height: clamp(11rem, 20vw, 15rem);
  object-fit: cover;
  border-radius: 50% 50% 2px 2px / 18% 18% 2px 2px;
}
.gallery__blank { background: var(--ink-deep); display: grid; place-items: center; }
.mark--blank {
  width: 3.2rem;
  height: 3.2rem;
  display: block;
  background: var(--saffron);
  -webkit-mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
  mask: url("../assets/img/Rameshwaram-Cafe-Logo.svg") center / contain no-repeat;
}
.gallery .rooms__caption { text-align: center; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .gallery { grid-template-columns: 1fr; } }

/* menu: ethic strip + outbound line */
.ethic-strip { padding-bottom: clamp(3rem, 7vw, 6rem); }
.ethic--page { margin: clamp(1.5rem, 3vw, 2.5rem) var(--gutter) 0; }
.ethic-strip .ethic { max-width: 56rem; }
.ethic__more { padding: 2rem var(--gutter) 0; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.2rem; }
.hands .ethic__more { padding-left: 0; }
.hands__ethic .ethic__more { padding: 2rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .open__mandala { animation: none; }
}
