/* ==========================================================
   Mariki Advisory — styles
   ----------------------------------------------------------
   EASY SETTINGS: change these values to adjust the look.
   ========================================================== */
:root {
  /* Colours */
  --paper: #F2ECDD;        /* page background */
  --ink: #22291F;          /* main text */
  --sage: #8C9A80;         /* rules, footer characters */
  --sage-deep: #55644E;    /* links, small labels */

  /* Type sizes (desktop) */
  --size-hero: 76px;
  --size-h2: 44px;
  --size-h3: 26px;
  --size-lead: 22px;
  --size-body: 19px;
  --size-small: 18px;
  --size-label: 12px;

  /* Layout */
  --page-width: 1440px;    /* maximum width of the content */
  --side-margin: 96px;     /* space either side of the content */
  --section-gap: 120px;    /* space between sections */
}

/* ---------- Fonts (stored locally, nothing loaded from Google) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Mariki JP";
  src: url("fonts/noto-serif-jp-mariki.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: var(--size-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a { color: var(--sage-deep); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }

p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.mono {
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip-link:focus { left: 16px; top: 16px; color: var(--paper); }

.wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--side-margin);
}

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; flex-direction: column; gap: 4px; color: var(--ink); }
.wordmark-name { font-size: 22px; letter-spacing: 0.28em; line-height: 1.2; }
.wordmark-sub { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: 10px; letter-spacing: 0.42em; color: var(--sage-deep); line-height: 1.2; }

/* ---------- Header and hero ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 48px;
}
.site-nav { display: flex; gap: 40px; }
.site-nav a {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 13px; letter-spacing: 0.08em;
  padding: 12px 0;
}

.hero {
  min-height: 720px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 96px;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end;
}
.hero h1 {
  font-size: var(--size-hero); line-height: 1.04; letter-spacing: -0.015em;
}
.hero-side {
  border-left: 1px solid var(--sage);
  padding-left: 40px;
  display: flex; flex-direction: column; gap: 20px;
}
.hero-side .mono { font-size: var(--size-label); letter-spacing: 0.14em; color: var(--sage-deep); }
.hero-side p { font-size: var(--size-lead); line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding-bottom: var(--section-gap); }

.section-head {
  border-top: 1px solid var(--sage);
  padding-top: 32px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px;
}
.section-title { grid-column: span 4; display: flex; flex-direction: column; gap: 16px; }
.section-label { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: var(--size-label); letter-spacing: 0.14em; color: var(--sage-deep); }
.section-title h2 { font-size: var(--size-h2); line-height: 1.1; }
.section-intro { grid-column: span 7; padding-top: 34px; display: flex; flex-direction: column; gap: 20px; }
.section-intro p { font-size: var(--size-lead); line-height: 1.55; }

/* About: profile */
.profile {
  margin-top: 96px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px;
}
.profile-photo { grid-column: span 4; display: flex; flex-direction: column; gap: 20px; }
.profile-photo img {
  width: 100%; max-width: 360px; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  mix-blend-mode: multiply; /* lets a white photo background take on the page colour */
}
.profile-name { font-size: 26px; line-height: 1.3; }
.profile-text {
  grid-column: 6 / span 7;
  border-left: 1px solid var(--sage);
  padding-left: 40px;
  display: flex; flex-direction: column; gap: 20px;
}

/* Services */
.services {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 48px; row-gap: 64px;
}
.service { border-top: 1px solid var(--sage); padding-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.service-num { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: var(--size-label); color: var(--sage-deep); }
.service h3 { font-size: var(--size-h3); line-height: 1.2; }
.service p { font-size: var(--size-small); line-height: 1.55; }

/* Contact */
.contact-email { font-size: 40px; line-height: 1.2; overflow-wrap: anywhere; }
.contact-link { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: 14px; letter-spacing: 0.08em; padding: 8px 0; }

/* ---------- Footer ---------- */
.site-footer { padding-bottom: 64px; }
.footer-inner {
  border-top: 1px solid var(--sage);
  padding-top: 40px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 32px;
}
.footer-details {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 12px; line-height: 1.7;
  display: flex; flex-direction: column; gap: 4px;
}
.footer-kanji {
  font-family: "Mariki JP", serif; font-weight: 500;
  font-size: 26px; line-height: 1.15; color: var(--sage);
  display: flex; flex-direction: column; align-items: center;
}

/* ---------- Privacy page ---------- */
.privacy { max-width: 760px; padding-top: 72px; }
.privacy h1 { font-size: var(--size-h2); line-height: 1.1; margin-bottom: 12px; }
.privacy .updated { font-family: "IBM Plex Mono", "Courier New", monospace; font-size: var(--size-label); color: var(--sage-deep); margin-bottom: 48px; }
.privacy h2 { font-size: var(--size-h3); line-height: 1.25; margin: 40px 0 12px; }
.privacy p + p { margin-top: 14px; }

/* ==========================================================
   Tablet
   ========================================================== */
@media (max-width: 1100px) {
  :root { --side-margin: 56px; --size-hero: 60px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================
   Mobile
   ========================================================== */
@media (max-width: 760px) {
  :root {
    --side-margin: 24px;
    --section-gap: 80px;
    --size-hero: 46px;
    --size-h2: 34px;
    --size-h3: 23px;
    --size-lead: 18px;
    --size-body: 17px;
    --size-small: 17px;
    --size-label: 11px;
  }
  .site-header { padding-top: 28px; }
  .wordmark-name { font-size: 18px; letter-spacing: 0.26em; }
  .wordmark-sub { font-size: 8px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 11px; letter-spacing: 0.04em; padding: 14px 0; }

  .hero { min-height: 0; padding-top: 120px; padding-bottom: 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { letter-spacing: -0.01em; line-height: 1.06; }
  .hero-side { padding-left: 20px; gap: 14px; }
  .hero-side .mono { font-size: 10px; letter-spacing: 0.12em; }

  .section-head { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }
  .section-intro { padding-top: 0; gap: 16px; }
  .profile { margin-top: 56px; display: flex; flex-direction: column; gap: 24px; }
  .profile-photo img { width: 240px; }
  .profile-name { font-size: 24px; }
  .profile-text { padding-left: 20px; gap: 16px; }
  .services { grid-template-columns: 1fr; row-gap: 40px; margin-top: 40px; }
  .service { padding-top: 20px; gap: 12px; }
  .contact-email { font-size: 28px; }

  .site-footer { padding-bottom: 48px; }
  .footer-inner {
    display: grid; grid-template-columns: 1fr auto;
    grid-template-areas: "brand kanji" "details details";
    gap: 28px; padding-top: 32px;
  }
  .footer-inner .wordmark { grid-area: brand; }
  .footer-kanji { grid-area: kanji; font-size: 22px; }
  .footer-details { grid-area: details; font-size: 11px; }
  .privacy { padding-top: 48px; }
}

.nowrap { white-space: nowrap; }
