/* ============================================================
   IN THE INTERVAL — style.css
   Single stylesheet. All design decisions live here.
   
   COLOUR PALETTE
   --bg:       #F7F4EF   Warm off-white
   --text:     #2C2C2C   Deep charcoal
   --accent:   #A89880   Warm stone
   --muted:    #9A9189   Subdued text (nav, captions, metadata)
   --rule:     #E2DDD7   Hairline dividers
   
   TYPOGRAPHY
   Shippori Mincho  — headings, the interval definition, kanji
   Noto Serif       — article body, long-form reading
   Noto Sans        — navigation, UI labels, metadata
   
   SPACING SCALE (rem)
   --space-xs:   0.5rem
   --space-sm:   1rem
   --space-md:   2rem
   --space-lg:   4rem
   --space-xl:   7rem
   --space-xxl: 12rem
   
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600&family=Noto+Sans:ital,wght@0,300;0,400;0,500;1,300&family=Noto+Serif:ital,wght@0,300;0,400;1,300;1,400&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg:        #F7F4EF;
  --text:      #2C2C2C;
  --accent:    #A89880;
  --highlight: #8b2e12;
  --muted:     #9A9189;
  --rule:      #E2DDD7;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-xxl: 12rem;

  --font-heading: 'Shippori Mincho', 'Noto Serif', Georgia, serif;
  --font-body:    'Noto Serif', Georgia, serif;
  --font-ui:      'Noto Sans', system-ui, sans-serif;

  --measure:     62ch;   /* max line length for reading columns */
  --measure-wide: 80ch;  /* wider for section containers */
}

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

/* --- Base --- */
html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.9;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

/* Narrow reading column — articles, philosophy text */
.container--narrow {
  width: 90%;
  max-width: var(--measure);
  margin: 0 auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

.nav__logo {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.nav__logo .kanji {
  color: var(--accent);
}

.nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav__links a {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--highlight);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ============================================================
   TYPOGRAPHY SYSTEM
   ============================================================ */

/* Display — site name, major section headings */
.t-display {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Heading 1 — page titles */
.t-h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--text);
}

/* Heading 2 — section headings */
.t-h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
}

/* Eyebrow — small label above headings */
.t-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-sm);
}

/* Body — standard prose */
.t-body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text);
}

/* UI — navigation, labels, captions */
.t-ui {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Kanji / Japanese characters */
.t-kanji {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  display: block;
}

/* ============================================================
   PROSE — long-form article text
   Used inside .prose wrapper
   ============================================================ */

.prose {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.95;
  color: var(--text);
  max-width: var(--measure);
}

.prose p {
  margin-bottom: 1.8em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 500;
  color: var(--text);
}

.prose em {
  font-style: italic;
  font-weight: 300;
}

/* Pull quote / interval definition style */
.prose--interval {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 2.1;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  border-left: 1px solid var(--accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

.prose--interval p {
  margin-bottom: 0.8em;
}

.prose--interval p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   SECTION SPACING
   ============================================================ */

.section {
  padding: var(--space-xl) 0;
}

.section--sm {
  padding: var(--space-lg) 0;
}

.section--lg {
  padding: var(--space-xxl) 0;
}

/* Horizontal rule / divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--rule);
  border: none;
  margin: 0;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  padding: var(--space-xxl) 0 var(--space-xl);
}

.hero__inner {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

/* ============================================================
   HERO SUB ROTATION ANIMATION
   Rotates between "Movement · Breath · Meditation" and "Empowerment"
   ============================================================ */

.hero__sub {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
  position: relative;
  height: 1.2em;
  overflow: hidden;
}

.hero__sub-inner {
  position: absolute;
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: rotateLabel 7s ease-in-out infinite;
}

.hero__sub-line {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  text-align: left;
}

.hero__sub-line--emp {
  text-align: left;
}

@keyframes rotateLabel {
  0%   { transform: translateY(0);      opacity: 1; }
  40%  { transform: translateY(0);      opacity: 1; }
  48%  { transform: translateY(-1.2em); opacity: 0.4; }
  52%  { transform: translateY(-1.2em); opacity: 1; }
  90%  { transform: translateY(-1.2em); opacity: 1; }
  98%  { transform: translateY(0);      opacity: 0.4; }
  100% { transform: translateY(0);      opacity: 1; }
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.hero__desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: var(--space-lg);
}

/* ============================================================
   LINKS & CTAs
   ============================================================ */

/* Inline link — understated, no underline by default */
.link {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Arrow link */
.link--arrow::after {
  content: ' →';
  font-style: normal;
}

/* ============================================================
   OFFERINGS / CARDS
   ============================================================ */

.offerings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.offering {
  border-top: 1px solid var(--rule);
  padding-top: var(--space-md);
}

.offering__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.offering__body {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

/* ============================================================
   WRITING / ARTICLE CARDS
   ============================================================ */

.writing-list {
  list-style: none;
}

.writing-item {
  border-top: 1px solid var(--rule);
  padding: var(--space-md) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: var(--space-md);
  transition: opacity 0.2s ease;
}

.writing-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.writing-item:hover {
  opacity: 0.7;
}

.writing-item__meta {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.writing-item__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.writing-item__excerpt {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

.writing-item__arrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.25rem;
  transition: color 0.2s ease;
}

.writing-item:hover .writing-item__arrow {
  color: var(--text);
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.article-header {
  padding: var(--space-xl) 0 var(--space-lg);
}

.article-header__category {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.article-header__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--space-sm);
  max-width: 22ch;
}

.article-header__subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: var(--muted);
  max-width: 46ch;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
}

.article-meta__name {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.article-meta__detail {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.article-body {
  padding: var(--space-lg) 0 var(--space-xl);
}

/* ============================================================
   FORM
   ============================================================ */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: var(--space-xs) 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--rule);
  font-style: italic;
}

.form-textarea {
  resize: none;
  min-height: 120px;
  line-height: 1.8;
}

.form-submit {
  display: inline-block;
  margin-top: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.form-submit:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   KARESANSUI IMAGE ELEMENT
   Appears at page foot — fades to near-invisible
   ============================================================ */

.karesansui {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  pointer-events: none;
}

.karesansui img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: blur(2px) brightness(1.05);
  transform: scale(1.03);
  opacity: 0.55;
}

.karesansui::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    transparent 40%,
    transparent 60%,
    var(--bg) 100%
  );
  z-index: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  padding: var(--space-lg) 0;
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer__copy {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer__links a {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--text);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.u-mb-sm  { margin-bottom: var(--space-sm); }
.u-mb-md  { margin-bottom: var(--space-md); }
.u-mb-lg  { margin-bottom: var(--space-lg); }
.u-mb-xl  { margin-bottom: var(--space-xl); }
.u-mt-sm  { margin-top: var(--space-sm); }
.u-mt-md  { margin-top: var(--space-md); }
.u-mt-lg  { margin-top: var(--space-lg); }
.u-mt-xl  { margin-top: var(--space-xl); }

.u-color-accent     { color: var(--accent); }
.u-color-muted      { color: var(--muted); }
.u-color-highlight  { color: var(--highlight); }

.u-text-center { text-align: center; }

/* Visually hidden (accessibility) */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 680px) {
  html {
    font-size: 17px;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    font-size: 1rem;
    letter-spacing: 0.14em;
  }

  .nav__toggle {
    display: block;
    z-index: 200;
  }

  .hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .section {
    padding: var(--space-lg) 0;
  }

  .section--lg {
    padding: var(--space-xl) 0;
  }

  .offerings {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .writing-item {
    grid-template-columns: 1fr;
  }

  .writing-item__arrow {
    display: none;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .karesansui {
    height: 200px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
