/* Fonts: self-hosted variable files (SIL Open Font License), latin subset */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700 1000; font-display: swap; src: url('fonts/nunito-latin.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/dm-sans-latin.woff2') format('woff2'); }

/* Seikode: tokens */
:root {
  --ink: #252c25;
  --muted: #5f655a;
  --green: #536b40;
  --green-soft: #a9c08c;
  --yellow: #f3d966;
  --paper: #fff;
  --soft: #f6f7ef;
  --line: #dfe3d8;
  --cream: #f4f2e8;
  --sage: #eef3e8;
  --mist: #edf1f6;
  --blush: #f7eee6;
  --header-h: 76px;
  --gutter: clamp(20px, 5vw, 72px);
  --display: 'Nunito', ui-rounded, 'Arial Rounded MT Bold', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-synthesis: none;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body { margin: 0; overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; border-radius: 6px; }
h1, h2, h3, p, ul { margin: 0; }
h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--yellow); }

.sprite { position: absolute; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -100px; left: 20px; background: var(--yellow); padding: 14px; z-index: 30; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(1180px, 100% - var(--gutter) * 2); margin-inline: auto; }

.icon { width: 1.25em; height: 1.25em; flex: none; transition: transform .25s var(--spring); }
.turn-ne { rotate: -45deg; }
.turn-se { rotate: 45deg; }
.turn-s { rotate: 90deg; }
.turn-n { rotate: -90deg; }

/* Header */
.header { position: sticky; top: 0; z-index: 20; height: var(--header-h); background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--gutter); }
.brand { font: 1000 27px/1 var(--display); letter-spacing: -1.3px; display: inline-flex; align-items: center; }
.brand-mark { width: 36px; height: 36px; margin-right: 10px; rotate: -6deg; transition: rotate .35s var(--spring); }
.brand:hover .brand-mark { rotate: 6deg; }
.brand-dot { color: var(--green); }
nav { display: flex; gap: clamp(18px, 3vw, 40px); font-size: 14px; font-weight: 500; }
nav a { padding: 8px 0; position: relative; }
nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 1px; height: 2px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
nav a:hover::after, nav a[aria-current]::after { transform: scaleX(1); }
nav a[aria-current]::after { background: var(--green); }
.header-link { border: 1.5px solid var(--ink); border-radius: 30px; padding: 10px 18px 10px 21px; font-size: 14px; font-weight: 500; display: flex; gap: 18px; align-items: center; transition: background .2s, transform .2s var(--spring); }
.header-link:hover { background: var(--yellow); }
.header-link:hover .icon { transform: translateX(3px); }
.header-link:active, .button:active { transform: scale(.97); }

/* Hero */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; height: calc(100svh - var(--header-h)); max-height: 1100px; min-height: max(660px, calc(450px + 21vw)); }
.hero-copy { position: relative; z-index: 2; text-align: center; padding: clamp(40px, 8vh, 84px) 20px 0; pointer-events: none; }
.hero-copy a, .hero-copy h1 span { pointer-events: auto; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .2px; color: var(--green); display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; }
h1 { font: 1000 clamp(64px, 10.5vw, 152px)/1.08 var(--display); letter-spacing: .04em; margin-bottom: 12px; cursor: default; }
h1 span { display: inline-block; transform: rotate(var(--r, 0deg)); transition: transform .35s var(--spring); animation: pop .75s var(--spring) backwards; animation-delay: calc(var(--i) * 55ms + 100ms); }
h1 span:hover { transform: translateY(-.08em) rotate(calc(var(--r, 0deg) * -1.4)); }
h1 .title-period { color: var(--green); margin-left: -.03em; }
.hero-tagline { font-size: clamp(20px, 2vw, 26px); letter-spacing: -.5px; font-weight: 700; margin-bottom: 26px; text-wrap: balance; }
.hero-tagline, .hero .button { animation: rise .7s var(--ease-out) backwards; animation-delay: .62s; }
.hero .button { animation-delay: .74s; }
.button { display: inline-flex; align-items: center; gap: 22px; background: var(--ink); color: #fff; border-radius: 40px; padding: 15px 22px 15px 27px; font-size: 14px; font-weight: 600; transition: transform .25s var(--spring), background .2s; }
.button:hover { background: var(--green); transform: translateY(-3px); }
.button:hover .icon { transform: translateX(3px); }

/* The artwork is anchored to the bottom center of the hero. Its sky is white, so it never needs to cover the full height. */
.scene { position: absolute; inset: 0; z-index: 1; container-type: size; pointer-events: none; animation: fade 1.1s ease .15s backwards; }
.scene-inner { position: absolute; left: 50%; bottom: 0; width: max(100cqw, 1000px); aspect-ratio: 1672 / 941; translate: -50% 0; }
.scene-art { width: 100%; height: 100%; display: block; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%); mask-image: linear-gradient(to bottom, transparent, #000 9%); }
.scene-note { pointer-events: auto; position: absolute; left: 66%; top: 70%; translate: -50% -50%; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; width: 36px; height: 36px; padding: 0; background: var(--yellow); color: var(--ink); box-shadow: 2px 3px 0 rgba(37, 44, 37, .14); transition: transform .25s var(--spring); z-index: 3; }
.scene-note::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1.5px solid var(--yellow); animation: ping 2.8s ease-out infinite; }
.scene-note[aria-expanded='true']::before { animation: none; opacity: 0; }
.scene-note:hover { transform: rotate(8deg) scale(1.1); }
.scene-note > span:first-child { font-size: 24px; line-height: 1; margin-top: -2px; }
.garden-note { pointer-events: auto; position: absolute; left: calc(66% - 125px); bottom: calc(30% + 30px); width: 250px; padding: 16px 20px; background: #fff; border: 1.5px solid var(--ink); border-radius: 16px 16px 16px 4px; box-shadow: 3px 4px 0 rgba(37, 44, 37, .14); text-align: center; font-size: 14px; line-height: 1.6; z-index: 4; transform-origin: 50% 100%; animation: pop-note .35s var(--spring); }
.scroll-cue { margin-top: auto; margin-bottom: 18px; position: relative; z-index: 2; display: inline-flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; padding: 9px 14px 9px 18px; border-radius: 30px; background: rgba(255, 255, 255, .9); border: 1.5px solid var(--ink); transition: background .2s; }
.scroll-cue:hover { background: var(--yellow); }
.scroll-cue .icon { animation: drift 2.4s ease-in-out infinite; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 132px); }
.section-label { font: 800 15px/1 var(--display); color: var(--green); display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-label::before { content: ''; width: 22px; height: 3px; border-radius: 3px; background: var(--yellow); rotate: -8deg; }
.section h2 { font: 800 clamp(31px, 3.4vw, 48px)/1.15 var(--display); letter-spacing: -.035em; }
.section-top { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.section-top > p { font-size: 15px; line-height: 1.7; color: var(--muted); }

/* Products */
.products { border-top: 1px solid var(--line); }
.product-list { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(24px, 5vw, 72px); padding: clamp(26px, 4vw, 56px); background: var(--cream); border-radius: 12px 12px 56px 12px; transition: transform .45s var(--ease-out); }
.product.travelai { background: var(--sage); border-radius: 12px 56px 12px 12px; }
.product.interview { background: var(--mist); border-radius: 56px 12px 12px 12px; }
.product.waypoint { background: var(--blush); border-radius: 12px 12px 12px 56px; }
.product.travelai, .product.waypoint { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.product.travelai .product-art, .product.waypoint .product-art { order: 2; }
.product-art { display: grid; place-items: center; }
.doodle { width: min(100%, 400px); height: auto; overflow: visible; transition: transform .6s var(--spring); }
.product:hover .doodle { transform: rotate(-2.5deg) scale(1.03); }
.product.travelai:hover .doodle, .product.waypoint:hover .doodle { transform: rotate(2.5deg) scale(1.03); }
.product-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.product-category { font-size: 13px; font-weight: 600; color: #6d6242; }
.waypoint .product-category { color: #8a5a36; }
.product-status { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 30px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(37, 44, 37, .12); }
.product-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--ink); }
.product-status.is-live::before { background: #8fbf6a; }
.travelai .product-category { color: var(--green); }
.interview .product-category { color: #526585; }
.product h3 { font: 900 clamp(32px, 3.6vw, 46px)/1.1 var(--display); letter-spacing: -.035em; margin-bottom: 10px; }
.product-tagline { font-size: 17px; font-weight: 600; line-height: 1.5; margin-bottom: 14px; }
.product-description { font-size: 16px; line-height: 1.75; color: var(--muted); max-width: 52ch; margin-bottom: 24px; }
.product-features { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.product-features li { font-size: 13.5px; font-weight: 500; padding: 7px 14px; border-radius: 30px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(37, 44, 37, .12); }
.product-note { font-size: 14px; line-height: 1.7; color: #50584b; max-width: 52ch; }
.product-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14.5px; font-weight: 600; padding: 11px 16px 11px 20px; border-radius: 30px; border: 1.5px solid var(--ink); background: rgba(255, 255, 255, .6); transition: background .2s, transform .25s var(--spring); }
.product-link:hover { background: var(--yellow); transform: translateY(-2px); }
.product-link:hover .icon { transform: translateX(3px); }
.product-link:active { transform: scale(.97); }

/* Studio */
.studio { border-top: 1px solid var(--line); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(30px, 6vw, 96px); align-items: end; position: relative; }
.studio h2 span { color: var(--green); }
.section.studio h2 { font-size: clamp(33px, 3.9vw, 54px); }
.studio-body { display: grid; gap: 18px; padding-bottom: 6px; }
.studio-body p { font-size: 17px; line-height: 1.8; color: var(--muted); max-width: 46ch; }
.studio-aside { position: absolute; right: 0; top: calc(clamp(64px, 9vw, 120px) * -1 - 46px); background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: 3px 4px 0 rgba(37, 44, 37, .14); padding: 14px 20px 15px; display: flex; align-items: center; gap: 12px; rotate: 4deg; }
.studio-aside .icon { width: 26px; height: 26px; }
.studio-aside p { font: 800 14px/1.45 var(--display); }

/* Approach */
.approach { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 84px minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 20px; padding: clamp(24px, 3vw, 38px) 0; border-top: 1px solid #c9d0bf; }
.principle:last-child { border-bottom: 1px solid #c9d0bf; }
.principle-symbol { width: 44px; height: 44px; color: var(--green); transition: transform .5s var(--spring); }
.principle:hover .principle-symbol { transform: rotate(-14deg) scale(1.12); }
.principle h3 { font: 800 clamp(23px, 2.3vw, 31px)/1.2 var(--display); letter-spacing: -.025em; }
.principle p { font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 50ch; }

/* Not found page */
.not-found .hero-tagline { margin-bottom: 26px; }

/* Legal pages */
.legal { padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
.legal .wrap { width: min(720px, 100% - var(--gutter) * 2); }
.legal h1 { font: 900 clamp(38px, 5vw, 60px)/1.1 var(--display); letter-spacing: -.035em; margin-bottom: 12px; cursor: auto; }
.legal-updated { font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.legal h2 { font: 800 24px/1.3 var(--display); letter-spacing: -.02em; margin: 44px 0 12px; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.8; color: #454b41; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 22px; margin-top: 10px; display: grid; gap: 6px; }
.legal a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--green-soft); }
.legal a:hover { text-decoration-color: var(--ink); }

/* Closing */
.closing { text-align: center; padding: clamp(80px, 11vw, 150px) 20px clamp(80px, 10vw, 136px); }
.closing .eyebrow { margin-bottom: 22px; }
.closing h2 { font: 800 clamp(38px, 5.2vw, 76px)/1.14 var(--display); letter-spacing: -.04em; margin-bottom: 36px; }
.closing h2 span { position: relative; isolation: isolate; white-space: nowrap; }
.closing h2 span::after { content: ''; position: absolute; inset: 62% -8px 3px; background: var(--yellow); z-index: -1; rotate: -2deg; border-radius: 40%; transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out) .45s; }
.closing .is-in h2 span::after, html:not(.js) .closing h2 span::after { transform: scaleX(1); }
.closing-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px 30px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; border-bottom: 1.5px solid var(--ink); padding: 7px 0; }
.text-link:hover .icon { transform: translateX(3px); }

/* Footer */
footer { padding: 0 var(--gutter); }
.footer-inner { border-top: 1px solid var(--line); padding: 28px 0 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
footer .brand { font-size: 23px; }
footer p, .copyright { font-size: 13px; color: var(--muted); }
footer nav { margin-left: auto; font-size: 13px; gap: 8px 24px; flex-wrap: wrap; }

/* Scroll reveals (only when JS is available) */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes pop { from { opacity: 0; transform: translateY(.35em) rotate(calc(var(--r, 0deg) * 3)) scale(.7); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-note { from { opacity: 0; transform: translateY(8px) scale(.92); } }
@keyframes drift { 50% { transform: translateX(4px); } }
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

/* Tablet */
@media (max-width: 900px) {
  .header-link, .scroll-cue { display: none; }
  .hero { max-height: 760px; }
  .product { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
  .product.travelai, .product.waypoint { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
  .studio-grid { grid-template-columns: 1fr; row-gap: 28px; }
  .studio-body { grid-template-columns: 1fr 1fr; gap: 28px; }
  .principle { grid-template-columns: 64px minmax(0, 1fr); row-gap: 10px; }
  .principle p { grid-column: 2; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 31px; height: 31px; margin-right: 8px; }
  nav { font-size: 13px; }
  .hero { height: auto; min-height: min(calc(100svh - var(--header-h)), 640px); padding-bottom: 240px; }
  .hero-copy { padding-top: 44px; }
  .hero-tagline { max-width: 300px; margin-inline: auto; }
  h1 { font-size: 15vw; letter-spacing: .02em; margin-bottom: 14px; }
  .scene-inner { width: 960px; translate: calc(-50% + 12px) 0; }
  .scene-note { left: 57.2%; top: 64%; }
  .garden-note { left: calc(57.2% - 200px); bottom: calc(36% + 30px); border-radius: 16px 16px 4px 16px; }
  .section-top { display: block; }
  .section-top > p { margin-top: 16px; }
  .section-top > p br { display: none; }
  .product, .product.travelai, .product.waypoint { grid-template-columns: 1fr; gap: 18px; padding: 26px 24px 30px; border-radius: 10px 10px 40px 10px; }
  .product.travelai { border-radius: 10px 40px 10px 10px; padding: 26px 24px 30px; }
  .product.interview { border-radius: 40px 10px 10px 10px; }
  .product.waypoint { border-radius: 10px 10px 10px 40px; }
  .product.travelai .product-art, .product.waypoint .product-art { order: 0; }
  .doodle { width: min(78%, 300px); }
  .studio-body { grid-template-columns: 1fr; gap: 14px; }
  .studio-body p { font-size: 16px; }
  .studio-aside { position: static; justify-self: start; margin-top: 8px; rotate: -2deg; }
  .principle { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 14px; }
  .principle-symbol { width: 34px; height: 34px; }
  .footer-inner { gap: 12px 20px; }
  footer p { display: none; }
  footer nav { margin-left: 0; width: 100%; order: 3; }
  .copyright { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .closing h2 span::after { transform: scaleX(1); }
}
