/* Fonts (self-hosted, SIL Open Font License) */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin.woff2") format("woff2");
}

/* Dreamy Technologies · tokens */
:root {
  --paper: #F4F5F1;
  --paper-deep: #EAEBE5;
  --ink: #1C1E24;
  --graphite: #555963;
  --hairline: #D6D8D1;
  --dusk: #3A3FC4;
  --dusk-soft: #DDDEF5;
  --moonlight: #F1EEDF;

  --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", ui-serif, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(5rem, 11vw, 9rem);
  --header-h: 4.25rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--dusk);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: .75rem; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Shared moon styles */
.moon-shadow { fill: none; stroke: var(--ink); stroke-opacity: .22; stroke-width: 1.25; }
.moon-lit { fill: var(--ink); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 245, 241, .86);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand-moon { width: 24px; height: 24px; }
.brand-moon .moon-shadow { stroke-opacity: .35; stroke-width: 1.5; }

.site-nav ul { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .9rem;
  font-size: .95rem;
  color: var(--graphite);
  text-decoration: none;
  border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav .nav-cta {
  margin-left: .5rem;
  color: var(--paper);
  background: var(--ink);
}
.site-nav .nav-cta:hover { color: var(--paper); background: var(--dusk); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: 0 .25rem 0 .75rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}
.menu-toggle-icon {
  position: relative;
  width: 18px;
  height: 10px;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-toggle-icon::before { top: 0; }
.menu-toggle-icon::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { top: 4.25px; transform: rotate(-45deg); }

/* Type */
.eyebrow,
.section-label,
.service-scope,
.product-kind,
.facts dt {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--graphite);
}

h1 {
  font-size: clamp(2.75rem, 7.2vw, 5.75rem);
  line-height: .98;
  font-weight: 600;
  letter-spacing: -.045em;
}
h1 em,
h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--dusk);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.035em;
  max-width: 20ch;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.015em;
}

/* Hero */
.hero { padding-top: clamp(3rem, 8vw, 6.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero .eyebrow { margin-bottom: 1.5rem; }
.hero h1 { max-width: 11ch; }

.lede {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--graphite);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.button-primary {
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}
.button-primary:hover { background: var(--dusk); }
.button-quiet { color: var(--ink); }
.button-quiet span { transition: transform .25s var(--ease); }
.button-quiet:hover span { transform: translateX(4px); }

.hero-art { justify-self: center; width: min(100%, 420px); }
.hero-art .dial {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: .35;
  stroke-width: 6;
  stroke-dasharray: 1 15.23;
}
.hero-art .dial-ring { fill: none; stroke: var(--hairline); stroke-width: 1; }
.hero-art .orbit { transform-origin: 200px 200px; }
.hero-art .orbit-dot { fill: var(--dusk); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--hairline);
}
.facts > div { padding: 1.25rem 1.5rem 0 0; }
.facts dd { margin-top: .35rem; font-weight: 500; }

/* Sections */
.section { padding-top: var(--section-space); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
}
.section-label { padding-top: .6rem; }

.prose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin-top: 2.5rem;
  color: var(--graphite);
}

.section-intro {
  margin-top: 1.5rem;
  max-width: 36rem;
  color: var(--graphite);
}

/* Principles */
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(3.5rem, 7vw, 5rem);
}
.principles li {
  padding: 2rem 1.75rem 2.25rem;
  background: var(--paper-deep);
  border-radius: 20px;
}
.principles h3 { margin-top: 1.75rem; }
.principles p { margin-top: .6rem; color: var(--graphite); font-size: 1rem; }

.glyph {
  display: block;
  position: relative;
  width: 40px;
  height: 40px;
}
/* Reliability: a full circle, unchanged. */
.glyph-reliable { border-radius: 50%; background: var(--ink); }
/* Simplicity: a single square, rotated. */
.glyph-simple::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid var(--ink);
  transform: rotate(45deg);
}
/* Experience: a crescent, the moment of first light. */
.glyph-experience {
  border-radius: 50%;
  box-shadow: inset -12px 0 0 0 var(--dusk);
  border: 1.25px solid rgba(28, 30, 36, .25);
}

/* Services */
.service-list { margin-top: 2.5rem; border-top: 1px solid var(--hairline); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: 1rem 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--hairline);
}
.service-scope { padding-top: .35rem; transition: color .25s; }
.service:hover .service-scope { color: var(--dusk); }
.service h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); }
.service p { margin-top: .6rem; max-width: 40rem; color: var(--graphite); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}
.tags li {
  padding: .3rem .8rem;
  font-size: .85rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
  gap: 1.25rem;
  margin-top: clamp(3rem, 6vw, 4rem);
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  border-radius: 24px;
  transition: border-color .3s, transform .4s var(--ease);
}
.product:hover { border-color: #BFC1BA; }

.product-art {
  display: grid;
  place-items: center;
  min-height: 18rem;
  padding: 2rem;
  background: var(--dusk-soft);
}
.product-art svg { width: min(100%, 220px); }
.product-art .moon-lit { fill: var(--dusk); }
.product-art .moon-shadow { stroke: var(--dusk); stroke-opacity: .5; }
.product-art .split-line { stroke: var(--dusk); stroke-width: 1.25; stroke-dasharray: 3 5; }

.product-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.75rem, 4vw, 3rem);
}
.product-body h3 {
  margin-top: .5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -.03em;
}
.product-body > p:not(.product-kind) { margin-top: .9rem; color: var(--graphite); }
.product-body .product-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  margin-top: auto;
  padding-top: 1.5rem;
  font-weight: 500;
  color: var(--dusk);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.product-link:hover { text-decoration-thickness: 2px; }

/* Contact: night falls, the moon is full. */
.contact {
  margin-top: var(--section-space);
  padding-block: var(--section-space);
  background: var(--ink);
  color: var(--paper);
}
.contact .section-label { color: #A6A9B1; padding-top: 0; margin-bottom: 1.5rem; }
.contact h2 { max-width: 16ch; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3rem;
}

.contact-text {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: #B9BCC4;
}

.contact-email {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  line-height: 1.2;
  color: var(--moonlight);
  text-decoration: none;
  overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .35s var(--ease);
}
.contact-email:hover { background-size: 0 1px; background-position: 100% 100%; }
.contact :focus-visible { outline-color: var(--moonlight); }

.contact-art svg { width: clamp(140px, 20vw, 240px); }
.contact-art .halo { fill: none; stroke: var(--moonlight); stroke-opacity: .18; stroke-dasharray: 1 9; stroke-width: 4; }
.contact-art .full-moon { fill: var(--moonlight); }

/* Footer */
.site-footer {
  padding-block: 2.5rem 3rem;
  background: var(--ink);
  color: #A6A9B1;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 1.5rem 3rem;
  padding-top: 2rem;
  border-top: 1px solid #33363E;
}
.footer-name { color: var(--paper); font-weight: 500; }
.site-footer a { text-underline-offset: 4px; }
.site-footer a:hover { color: var(--paper); }
.site-footer :focus-visible { outline-color: var(--moonlight); }

/* Motion: only for people who have not asked for less. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-art { animation: fade 1.4s var(--ease) .2s both; }

  .hero-art .orbit { animation: orbit 48s linear infinite; }

  .product:hover { transform: translateY(-3px); }
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes orbit { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { grid-row: 1; width: min(62vw, 300px); justify-self: start; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div { padding-bottom: 1.25rem; }
  .split { grid-template-columns: 1fr; }
  .section-label { padding-top: 0; }
  .principles { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product-art { min-height: 13rem; }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: .5rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 0; font-size: 1.1rem; color: var(--ink); border-radius: 0; }
  .site-nav li + li { border-top: 1px solid var(--hairline); }
  .site-nav .nav-cta { margin: 0; color: var(--dusk); background: none; }
  .site-nav .nav-cta:hover { color: var(--dusk); background: none; }

  .hero-art { width: min(52vw, 210px); }
  .prose { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; gap: .5rem; padding: 1.75rem 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-art { grid-row: 1; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { padding-right: 0; }
}

/* Without JS the toggle can't work, so the mobile nav sits inline instead. */
html:not(.js) .menu-toggle { display: none; }
@media (max-width: 760px) {
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-block: .5rem; }
  html:not(.js) .site-nav { position: static; width: 100%; padding: 0; border: 0; }
}
