/* Ricompany Inc. Visual direction: docs/design-direction.md */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2022, U+2026, U+2190-2199;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2022, U+2026, U+2190-2199;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2022, U+2026, U+2190-2199;
}

:root {
  color-scheme: light;
  --paper: #FFF8F1;
  --cream: #FFF0E6;
  --cream-deep: #F8E6D8;
  --peach: #FF8C5A;
  --peach-soft: #FFB088;
  --orange: #E0683A;
  --ink: #3D2B1F;
  --ink-2: #8A5234;
  --link: #B5481C;
  --hairline: #D9C2AE;
  --glass-bg: rgba(255, 255, 255, .45);
  --glass-edge: rgba(255, 255, 255, .75);
  --glass-shadow: 0 24px 60px rgba(61, 43, 31, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pop: cubic-bezier(.3, 1.4, .5, 1);
  --pad: 20px;
  --section-y: 80px;
}
@media (min-width: 768px) { :root { --pad: 48px; } }
@media (min-width: 1024px) { :root { --section-y: 128px; } }

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

body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(255, 176, 136, .35) 1px, transparent 1.6px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 1.25rem; line-height: 1.6; } }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
[id] { scroll-margin-top: 96px; }

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: inherit;
}

.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 400; font-synthesis: none; }
em { font-style: italic; }
.accent { color: var(--orange); font-style: italic; }

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 20;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 500;
}
.skip:focus { top: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  border-radius: 32px;
}
@media (max-width: 767px) {
  .glass { -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(255, 248, 241, .94); }
}

/* ---------- links and labels ---------- */
.label {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .16em; color: var(--ink-2);
}
.label .em { font-size: 1em; margin-right: 8px; letter-spacing: 0; }

.link {
  color: var(--link); text-decoration: none;
  background-image: linear-gradient(var(--peach), var(--peach));
  background-repeat: no-repeat; background-position: 0 100%;
  background-size: 100% 1.5px; padding-bottom: 4px;
  transition: background-size 250ms var(--ease);
}
.link:hover, .link:focus-visible { background-size: 100% 3px; }

.draw {
  text-decoration: none; color: inherit;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 100%;
  background-size: 0% 1.5px; padding-bottom: 2px;
  transition: background-size 250ms var(--ease);
}
.draw:hover, .draw:focus-visible { background-size: 100% 1.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 16px 28px; border-radius: 999px;
  font: 600 17px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 250ms var(--ease), color 250ms var(--ease), transform 250ms var(--ease);
}
.btn-primary { background: var(--link); color: #fff; }
.btn-primary:hover { background: #9C3B15; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-primary:hover { transform: translateY(-2px); }
}

/* ---------- pill ---------- */
.pill {
  position: fixed; top: 16px; left: 0; right: 0; margin: 0 auto; z-index: 10;
  width: max-content; max-width: calc(100% - 32px); height: 52px; padding: 0 24px;
  display: flex; align-items: center; gap: 32px; border-radius: 999px;
  transition: box-shadow 200ms var(--ease);
}
.pill.scrolled { box-shadow: 0 16px 40px rgba(61, 43, 31, .2), inset 0 1px 0 rgba(255, 255, 255, .8); }
.pill-mark { font-family: var(--font-display); font-size: 24px; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pill nav { display: none; }
.pill nav a { font-size: 15px; font-weight: 500; line-height: 1; color: var(--ink); padding: 12px 8px; display: inline-block; }
.pill nav a.draw { background-position: 8px calc(100% - 10px); background-size: 0% 1.5px; padding-bottom: 12px; }
.pill nav a.draw:hover, .pill nav a.draw:focus-visible { background-size: calc(100% - 16px) 1.5px; }
.pill nav { gap: 24px; }
@media (min-width: 768px) { .pill nav { display: flex; } }

/* ---------- orbs ---------- */
.orb {
  position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0%, transparent 68%);
}
@keyframes drift { from { translate: 0 -20px; } to { translate: 0 20px; } }
@supports (animation-timeline: scroll()) {
  .orb { animation: drift linear both; animation-timeline: scroll(root); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow-x: clip;
  min-height: 100svh; padding: 128px 0 64px;
  display: grid; align-content: center;
}
.hero .orb.a { --c: rgba(255, 176, 136, .55); width: 560px; height: 560px; right: -200px; top: 12%; }
.hero .orb.b { --c: rgba(255, 140, 90, .25); width: 420px; height: 420px; left: -180px; bottom: -80px; }

.hero-grid {
  display: grid; row-gap: 16px; column-gap: 0;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "eyebrow eyebrow" "line1 line1" "inc photo" "lede lede" "cta cta" "crew crew";
  --wm: clamp(4.25rem, 19vw, 12.5rem);
}
.eyebrow { grid-area: eyebrow; margin-bottom: 8px; }
.wordmark { display: contents; font-size: var(--wm); }
.mask { display: block; overflow: hidden; padding: 0 .1em .16em 0; margin-bottom: -.16em; font-size: var(--wm); line-height: .92; letter-spacing: -.02em; white-space: nowrap; }
.mask > span { display: block; }
.mask.l1 { grid-area: line1; }
.mask.l2 { grid-area: inc; }
.mask.l2 > span { color: var(--orange); font-style: italic; }
.mask.l2 > span { transition-delay: 120ms; }

.hero-photo { grid-area: photo; justify-self: end; align-self: end; position: relative; margin: 0 0 .1em; width: min(180px, 52vw); }
.hero-photo::before {
  content: ""; position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  width: 300px; height: 300px; left: 50%; top: 50%; margin: -150px 0 0 -150px;
  background: radial-gradient(circle, rgba(255, 176, 136, .5) 0%, rgba(255, 176, 136, .5) 40%, transparent 68%);
}
.hero-photo img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 32px; filter: drop-shadow(0 18px 24px rgba(61, 43, 31, .18)); }

.lede { font-size: 1.25rem; line-height: 1.55; max-width: 24em; }
.hero .lede { grid-area: lede; margin-top: 32px; }
.hero .cta { grid-area: cta; margin-top: 16px; }
.hero .cta .btn { width: 100%; }

.hero-crew { grid-area: crew; justify-self: center; position: relative; width: 150px; margin-top: 64px; }
.bubble {
  position: absolute; right: 55%; bottom: 92%; white-space: nowrap;
  padding: 10px 18px; border-radius: 24px; font-size: 16px; line-height: 1.4; font-weight: 500;
  transform-origin: 100% 100%;
}
.bubble::after {
  content: ""; position: absolute; right: 18px; bottom: -7px; width: 14px; height: 14px;
  background: rgba(255, 255, 255, .6); border-right: 1px solid var(--glass-edge); border-bottom: 1px solid var(--glass-edge);
  transform: rotate(45deg); border-bottom-right-radius: 4px;
}

@media (min-width: 768px) {
  .hero-photo { width: 260px; }
  .hero .cta .btn { width: auto; }
  .hero-crew { justify-self: end; width: 200px; }
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: auto auto minmax(0, 1fr) 260px;
    grid-template-areas:
      "eyebrow eyebrow eyebrow eyebrow"
      "line1 line1 line1 crew"
      "inc photo . crew"
      "lede lede lede ."
      "cta . . .";
  }
  .hero-photo { justify-self: start; margin-left: .4em; }
  .hero-crew { width: 240px; align-self: end; justify-self: end; margin-top: 0; }
  .hero .lede { font-size: 1.5rem; line-height: 1.5; }
}

/* hero entrance (JS only) */
@keyframes rise { to { transform: none; } }
@keyframes fade-in { to { opacity: 1; transform: none; } }
@keyframes pop { to { opacity: 1; transform: none; } }
.js .mask > span { transform: translateY(105%); animation: rise 900ms var(--ease) forwards; }
.js .mask.l2 > span { animation-delay: 120ms; }
.js .hero-photo { opacity: 0; transform: scale(.96); animation: fade-in 700ms var(--ease) 450ms forwards; }
.js .hero-crew { opacity: 0; transform: translateY(24px); animation: fade-in 700ms var(--ease) 600ms forwards; }
.js .bubble { opacity: 0; transform: scale(.8); animation: pop 400ms var(--pop) 1100ms forwards; }

/* idle bob */
@keyframes bob { to { transform: translateY(var(--bob, -6px)); } }
.bob { animation: bob 5s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -.7s); }

/* ---------- sections ---------- */
.section { position: relative; padding: var(--section-y) 0; overflow-x: clip; }
.band { background: var(--cream); }
.section h2 { font-size: clamp(2.75rem, 5.5vw, 5rem); line-height: 1.02; letter-spacing: -.01em; margin-top: 16px; }
.section h2 em { color: var(--orange); }

/* about */
.about-grid { display: grid; gap: 48px; margin-top: 48px; }
.about-text { max-width: 52ch; }
.about-text p + p { margin-top: 24px; }
.about-text .welcome { font-family: var(--font-display); font-style: italic; font-size: 1.75rem; line-height: 1.25; }
.fiche { border-bottom: 1px solid var(--hairline); }
.fiche > div { border-top: 1px solid var(--hairline); padding: 20px 0; }
.fiche dt { margin: 0 0 4px; }
.fiche dd { margin: 0; font-size: 1.25rem; line-height: 1.45; }
.fiche { margin: 0; }
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: repeat(12, 1fr); column-gap: 32px; }
  .about-text { grid-column: 1 / span 7; }
  .fiche { grid-column: 9 / span 4; align-self: start; margin-top: 8px; }
}

/* collections */
.sec-head .lede { margin-top: 16px; }
.cards { position: relative; display: grid; gap: 16px; margin-top: 64px; }
.cards .orb.a { --c: rgba(255, 176, 136, .6); width: 480px; height: 480px; left: calc(50% - 360px); top: calc(50% - 240px); }
.cards .orb.b { --c: rgba(255, 140, 90, .3); width: 360px; height: 360px; right: -180px; bottom: -180px; }
.card {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  padding: 28px; transition: transform 250ms var(--ease), background-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card h3 { font-size: clamp(2.75rem, 4.5vw, 4rem); line-height: 1; margin-top: 32px; }
.card p.desc { margin-top: 16px; font-size: 1.25rem; line-height: 1.5; max-width: 30ch; }
.card .domain { margin-top: 32px; font-size: 16px; line-height: 1.5; color: var(--ink-2); transition: color 250ms var(--ease); }
.card hr { border: 0; border-top: 1px solid var(--hairline); margin: 16px 0; width: 100%; }
.card-cta { margin-top: auto; color: var(--link); font-weight: 600; font-size: 1.125rem; text-decoration: none; width: fit-content; }
.card-cta::after { content: ""; position: absolute; inset: 0; border-radius: 32px; }
.card-cta:focus-visible { outline: none; }
.card-cta:focus-visible::after { outline: 3px solid var(--link); outline-offset: 3px; }
.card .arrow { display: inline-block; transition: transform 250ms var(--ease); }
@media (hover: hover) {
  .card:hover { background-color: rgba(255, 255, 255, .62); box-shadow: 0 32px 72px rgba(61, 43, 31, .2), inset 0 1px 0 rgba(255, 255, 255, .8); }
  .card:hover .domain { color: var(--link); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-6px); }
  .card:hover .arrow { transform: translateX(6px); }
}
@media (min-width: 768px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 32px; }
  .card { padding: 48px; min-height: 420px; }
}

/* atelier */
.crew-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; margin-top: 64px; }
.tile .stage { position: relative; aspect-ratio: 1; background: var(--cream-deep); border-radius: 32px; }
.tile .ground {
  position: absolute; left: 20%; width: 60%; height: 14px; bottom: 6%;
  background: radial-gradient(ellipse, rgba(61, 43, 31, .18), transparent 70%);
  transition: transform 300ms var(--pop), opacity 300ms var(--ease);
}
.tile .char { position: absolute; left: 11%; width: 78%; bottom: 7%; transition: transform 300ms var(--pop); }
.tile .char img { width: 100%; height: auto; }
.tile h3 { margin-top: 16px; font-style: italic; font-size: 1.625rem; line-height: 1.1; }
.tile p { margin-top: 8px; font-size: 15px; line-height: 1.45; max-width: 30ch; }
.tile h3 span { transition: background-size 250ms var(--ease); }
@media (hover: hover) {
  .tile:hover h3 span { background-size: 100% 1.5px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile:hover .char { transform: translateY(-10px) rotate(-2deg); }
  .tile:nth-child(even):hover .char { transform: translateY(-10px) rotate(2deg); }
  .tile:hover .ground { transform: scale(.8); opacity: .8; }
}
.tile-note {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 160px; padding: 32px; text-align: center; background: var(--paper);
  border: 1.5px dashed var(--peach-soft); border-radius: 32px;
  font-family: var(--font-display); font-style: italic; font-size: 1.75rem; line-height: 1.25;
}
.tile-note .em { font-style: normal; font-size: 1.5rem; }
@media (min-width: 768px) {
  .crew-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; }
  .tile-note { grid-column: span 2; }
  .tile h3 { font-size: 1.875rem; }
  .tile p { font-size: 16px; }
}
@media (min-width: 1024px) {
  .crew-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile-note { grid-column: span 1; }
}

/* closing */
.closing { text-align: center; }
.closing .family { width: min(520px, 88vw); margin: 48px auto 0; --bob: -4px; }
.closing .family img { width: 100%; height: auto; }
.closing .lede { margin: 32px auto 0; max-width: 28em; }
.closing .actions { margin-top: 48px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
@media (min-width: 768px) {
  .closing .actions { flex-direction: row; justify-content: center; gap: 16px; }
}

/* ---------- footer ---------- */
.site-footer {
  position: relative; z-index: 1;
  background: var(--peach); color: var(--ink);
  border-radius: 24px 24px 0 0; padding: 64px var(--pad) 32px;
}
.site-footer :focus-visible { outline-color: var(--ink); }
.foot-inner { max-width: 1200px; margin: 0 auto; }
.foot-top { display: flex; flex-direction: column; gap: 32px; }
.foot-mark { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; }
.foot-mark em { font-style: italic; }
.foot-job { margin-top: 12px; font-size: 1.125rem; line-height: 1.5; }
.foot-job a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.foot-links { display: flex; flex-direction: column; }
.foot-links a {
  display: flex; align-items: center; min-height: 48px; width: fit-content;
  font-size: 1.125rem; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px;
  transition: text-decoration-thickness 200ms var(--ease);
}
.foot-links a:hover { text-decoration-thickness: 3px; }
.foot-links .arrow { display: inline-block; margin-left: 4px; transition: transform 200ms var(--ease); }
.foot-rule { border: 0; border-top: 1px solid rgba(61, 43, 31, .45); margin: 48px 0 24px; }
.small { font-size: 15px; line-height: 1.5; }
@media (min-width: 768px) {
  .site-footer { border-radius: 48px 48px 0 0; padding-top: 96px; padding-bottom: 48px; }
  .foot-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .foot-links { flex-direction: row; gap: 32px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .foot-links a:hover .arrow { transform: translate(3px, -3px); }
}

/* ---------- reveal (JS only) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; align-content: center; justify-items: center; text-align: center; padding: 128px var(--pad) 64px; position: relative; overflow-x: clip; }
.lost h1 { font-size: clamp(3.5rem, 12vw, 9rem); line-height: .95; letter-spacing: -.02em; position: relative; z-index: 1; }
.lost h1 em { color: var(--orange); }
.lost .lede { margin: 24px auto 0; position: relative; z-index: 1; }
.lost .btn { margin-top: 32px; position: relative; z-index: 1; }
.lost .hero-crew { margin-top: 48px; justify-self: center; width: 150px; }
.lost .orb.a { --c: rgba(255, 176, 136, .55); width: 560px; height: 560px; left: 50%; top: 20%; margin-left: -280px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  [data-reveal], .mask > span, .hero-photo, .hero-crew, .bubble {
    opacity: 1 !important; transform: none !important;
  }
}
