/* ==========================================================================
   sasahara.dev — Modernist / dark
   Design tokens are derived from the Modernist design system (Archivo,
   zero radius, 2px rules, single red accent), re-grounded on a dark field.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  /* ground */
  --bg: #141312;
  --bg-alt: #111010;
  --surface: #1a1817;
  --surface-hi: #201e1d;

  /* ink */
  --ink: #f3f2f2;
  --ink-2: rgba(243, 242, 242, .78);
  --ink-3: rgba(243, 242, 242, .62);
  --ink-4: rgba(243, 242, 242, .45);

  /* accent — Modernist accent ramp, step 500 for a dark ground */
  --accent: #ff563c;
  --accent-hover: #ff9783;

  /* rules */
  --rule-strong: 2px solid rgba(243, 242, 242, .16);
  --rule: 1px solid rgba(243, 242, 242, .16);
  --rule-soft: 1px solid rgba(243, 242, 242, .10);

  --font-heading: "Archivo", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Archivo", "Noto Sans JP", system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --sec-pad: clamp(48px, 7vw, 96px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -.018em;
  margin: 0;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

::selection { background: rgba(255, 86, 60, .35); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::placeholder { color: rgba(243, 242, 242, .35); }

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

/* — motion ---------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.fade { animation: fade .8s ease both; }

/* Scroll-driven where supported; a plain on-load play elsewhere. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise 1s cubic-bezier(.2, .7, .2, 1) both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}
@supports not (animation-timeline: view()) {
  .reveal { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .fade, .reveal { animation: none !important; opacity: 1; transform: none; }
}

/* — header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 19, 18, .86);
  backdrop-filter: blur(14px);
  border-bottom: var(--rule-strong);
}
.site-header .wrap {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 24px; height: 72px;
}
.brand {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  color: var(--ink); font-weight: 800; font-size: 17px;
}
.brand:hover { color: var(--ink); }
.brand .en {
  font-size: 10px; letter-spacing: .22em; color: var(--ink-4);
  font-weight: 400; font-variant-numeric: tabular-nums;
}
.site-nav { display: flex; align-items: stretch; }
.site-nav a {
  display: flex; align-items: center; padding: 0 18px;
  font-size: 12px; letter-spacing: .14em; color: rgba(243, 242, 242, .7);
  border-left: var(--rule-soft);
}
.site-nav a:hover { color: var(--ink); background: rgba(243, 242, 242, .06); }
.site-nav a.cta {
  padding: 0 clamp(16px, 2vw, 26px);
  background: var(--accent); color: var(--bg);
  font-family: var(--font-heading); font-weight: 800; font-size: 13px;
  letter-spacing: .06em; border-left: 0;
}
.site-nav a.cta:hover { background: var(--accent-hover); color: var(--bg); }

/* — buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 14px;
  letter-spacing: .04em; padding: 17px 28px; border: 1px solid transparent;
  border-radius: 0; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn-primary:active { background: #dd2b0f; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { border-color: rgba(243, 242, 242, .28); color: var(--ink); }
.btn-ghost:hover {
  background: rgba(243, 242, 242, .08); color: var(--ink);
  border-color: rgba(243, 242, 242, .5);
}

/* — hero ----------------------------------------------------------------- */
.hero { border-bottom: var(--rule-strong); }
.hero .wrap { padding-top: clamp(60px, 10vw, 132px); padding-bottom: clamp(52px, 7vw, 88px); }
.eyebrow {
  display: block; font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(243, 242, 242, .5); margin-bottom: clamp(28px, 4vw, 44px);
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 68px); line-height: 1.14;
  letter-spacing: -.02em; max-width: 22ch;
  margin-bottom: clamp(24px, 3.4vw, 40px); text-wrap: pretty;
}
.hero h1 span { display: block; }
.hero h1 span:nth-child(1) { animation-delay: .05s; }
.hero h1 span:nth-child(2) { animation-delay: .17s; }
.hero h1 span:nth-child(3) { animation-delay: .29s; }
.hero h1 .nowrap { display: inline; white-space: nowrap; }
.lead {
  max-width: 54ch; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.9;
  color: rgba(243, 242, 242, .72); text-wrap: pretty;
  margin-bottom: clamp(32px, 4vw, 44px); animation-delay: .42s;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 2px; animation-delay: .54s; }

/* — sections ------------------------------------------------------------- */
main section { border-bottom: var(--rule-strong); }
main section > .wrap { padding-top: var(--sec-pad); padding-bottom: var(--sec-pad); }
section.alt { background: var(--bg-alt); }
#contact { border-bottom: 0; }

.sec-head { max-width: 74ch; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-num {
  display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px; font-variant-numeric: tabular-nums;
}
.sec-head h2 { font-size: clamp(26px, 3.4vw, 44px); line-height: 1.15; margin-bottom: 16px; }
.sec-head p { font-size: 15px; line-height: 1.85; color: rgba(243, 242, 242, .66); text-wrap: pretty; }

/* — services ------------------------------------------------------------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px; background: rgba(243, 242, 242, .16); border: var(--rule);
}
.card {
  background: var(--surface); padding: clamp(24px, 2.6vw, 36px);
  display: flex; flex-direction: column; gap: 16px;
}
.card:hover { background: var(--surface-hi); }
.card h3 { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.3; letter-spacing: -.01em; }
.card p { font-size: 14px; line-height: 1.85; color: rgba(243, 242, 242, .68); text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tags li {
  font-size: 11px; padding: 5px 10px; white-space: nowrap;
  border: 1px solid rgba(243, 242, 242, .2); color: rgba(243, 242, 242, .72);
}

/* — process -------------------------------------------------------------- */
.process-head {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 64px); align-items: start;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.process-head .sec-head { margin-bottom: 0; }
.process-head > p { font-size: 15px; line-height: 1.85; color: rgba(243, 242, 242, .66); max-width: 56ch; text-wrap: pretty; }
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: var(--rule-strong);
}
.step {
  padding: clamp(24px, 2.6vw, 36px) clamp(20px, 2vw, 28px) clamp(28px, 3vw, 44px);
  border-right: var(--rule-soft);
}
.step .n { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step .n b {
  font-family: var(--font-heading); font-weight: 800; font-size: 14px;
  letter-spacing: .1em; color: var(--accent); font-variant-numeric: tabular-nums;
}
.step .n i { height: 2px; flex: 1; background: rgba(243, 242, 242, .16); }
.step h3 { font-size: 18px; line-height: 1.35; margin-bottom: 12px; }
.step p { font-size: 13.5px; line-height: 1.85; color: rgba(243, 242, 242, .64); text-wrap: pretty; }

/* — engagement ----------------------------------------------------------- */
.plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2px; background: rgba(243, 242, 242, .16); border: var(--rule);
}
.plan { background: var(--surface); padding: clamp(28px, 3vw, 44px); }
.plan .kind {
  display: inline-block; font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  background: var(--accent); color: var(--bg); padding: 5px 10px; margin-bottom: 22px;
}
.plan h3 { font-size: clamp(21px, 2vw, 28px); line-height: 1.25; margin-bottom: 24px; }
.plan ul { border-top: var(--rule-soft); }
.plan li {
  display: flex; gap: 14px; padding: 14px 0; border-bottom: var(--rule-soft);
  font-size: 14px; line-height: 1.6; color: rgba(243, 242, 242, .8);
}
.plan li::before { content: "—"; color: var(--accent); flex: none; }

.note {
  margin-top: clamp(28px, 3vw, 40px); max-width: 78ch;
  font-size: 14px; line-height: 1.9; color: var(--ink-3);
  border-left: 2px solid var(--accent); padding-left: 20px; text-wrap: pretty;
}

/* — profile -------------------------------------------------------------- */
.profile {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.profile .sec-head { margin-bottom: 28px; }
.id-block { border-top: var(--rule-strong); padding-top: 20px; }
.id-block .name { font-family: var(--font-heading); font-weight: 800; font-size: 26px; line-height: 1.2; margin-bottom: 6px; }
.id-block .name-en { font-size: 11px; letter-spacing: .22em; color: var(--ink-4); margin-bottom: 14px; }
.id-block .role { font-size: 13px; color: var(--ink-3); }
.bio p { font-size: 15px; line-height: 1.9; color: var(--ink-2); text-wrap: pretty; }
.bio p + p { margin-top: 18px; }
.skill-list { border-top: var(--rule-strong); margin-top: 32px; }
.skill-list li {
  display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 16px; padding: 16px 0; border-bottom: var(--rule-soft); align-items: baseline;
}
.skill-list b { font-size: 11px; letter-spacing: .16em; color: var(--accent); font-weight: 600; }
.skill-list span { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }

/* — contact -------------------------------------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.contact-grid .sec-head { margin-bottom: 28px; max-width: 46ch; }
.contact-note {
  font-size: 14px; line-height: 1.9; color: var(--ink-3); max-width: 46ch;
  border-left: var(--rule-strong); padding-left: 20px; text-wrap: pretty;
}
.form {
  border: var(--rule); background: var(--surface);
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .1em; color: rgba(243, 242, 242, .8);
}
.req, .opt { font-size: 10px; letter-spacing: .12em; padding: 3px 7px; }
.req { background: var(--accent); color: var(--bg); }
.opt { border: 1px solid rgba(243, 242, 242, .25); color: var(--ink-3); }
.field input, .field textarea {
  width: 100%; background: var(--bg); color: var(--ink);
  border: 1px solid rgba(243, 242, 242, .22); border-radius: 0;
  font-family: inherit; font-size: 15px; line-height: 1.7; padding: 13px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.form-note { font-size: 12px; line-height: 1.8; color: rgba(243, 242, 242, .5); }
.form-status { font-size: 13px; line-height: 1.7; color: rgba(243, 242, 242, .85); }
.form-status.ng { color: var(--accent-hover); }

/* — footer --------------------------------------------------------------- */
.site-footer { border-top: var(--rule-strong); background: var(--bg-alt); }
.site-footer .wrap {
  padding-top: 36px; padding-bottom: 36px;
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
}
.site-footer .fname { font-family: var(--font-heading); font-weight: 800; font-size: 15px; margin-right: 14px; }
.site-footer > .wrap > div { font-size: 12.5px; color: rgba(243, 242, 242, .55); }
.site-footer nav { display: flex; gap: 24px; }
.site-footer nav a { font-size: 12px; letter-spacing: .1em; color: var(--ink-3); }
.site-footer nav a:hover { color: var(--ink); }

/* — legal (privacy page) -------------------------------------------------- */
.page-head { background: var(--bg-alt); border-bottom: var(--rule-strong); }
.page-head .wrap { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(36px, 4vw, 48px); }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; margin-bottom: 10px; }
.page-head p { font-size: 12px; letter-spacing: .12em; color: var(--ink-4); }

.legal .wrap { padding-top: var(--sec-pad); padding-bottom: var(--sec-pad); }
.legal p, .legal li { font-size: 14px; line-height: 1.9; color: var(--ink-2); text-wrap: pretty; }
.legal h2 {
  font-size: 18px; line-height: 1.3; margin: 48px 0 18px;
  padding-bottom: 14px; border-bottom: var(--rule-strong);
}
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 14px; letter-spacing: .04em; margin: 28px 0 10px; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: 8px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal dl { border-top: var(--rule-soft); }
.legal dt { font-size: 11px; letter-spacing: .1em; color: var(--accent); margin-top: 18px; }
.legal dd { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.legal table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13px; border: var(--rule); }
.legal th, .legal td { border: var(--rule-soft); padding: 12px 14px; text-align: left; vertical-align: top; }
.legal th { background: var(--surface); color: var(--ink); font-weight: 600; white-space: nowrap; }
.legal .updated { color: var(--ink-3); font-size: 12px; margin-top: 48px; border-top: var(--rule-strong); padding-top: 20px; }

/* — responsive ----------------------------------------------------------- */
@media (max-width: 899px) {
  .site-nav a.hide-sp { display: none; }
  .step { border-right: 0; border-bottom: var(--rule-soft); }
}
