/*
 * ordona.ai: the stylesheet. Palette and type from the brand files in public/brand/: ink #2F3430,
 * sage #6F8F7A, stone #EEEDE6, and Source Serif 4, the face the wordmark is drawn from, beside
 * Source Sans 3. The fonts are served from this site, never from a font CDN, so a visit sends no
 * address to anyone but the host.
 *
 * A quiet page on purpose: one headline, one sentence, a field of blades, and a contact address.
 * Contrast on stone: ink 10.8:1, --ink-2 5.4:1, --sage-deep 5.4:1; plain sage and the line colours
 * are kept to strokes, never text. On ink: stone 10.8:1, --on-ink-2 7.4:1, --sage-light 6.8:1.
 */


@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-serif-4-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-serif-4-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-sans-3-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(fonts/source-sans-3-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #2f3430;
  --ink-2: #5b615c;
  --sage: #6f8f7a;
  --sage-deep: #4a6654;
  --sage-light: #a9c4b0;
  --stone: #eeede6;
  --paper: #f8f7f2;
  --line: #d9d7cc;
  --line-strong: #c9c6b9;
  --on-ink: #eeede6;
  --on-ink-2: #c3c7c1;
  --on-ink-line: rgba(238, 237, 230, 0.14);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 70rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --field: clamp(15rem, 36vw, 30rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

/* head.js sets this when the page must change language before it is shown; the delay is the
   safety net, so a script that fails never leaves the page blank. */
.lang-pending body {
  visibility: hidden;
  animation: ordona-reveal 0s linear 1.5s forwards;
}

@keyframes ordona-reveal {
  to {
    visibility: visible;
  }
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

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

.skip {
  position: absolute;
  top: -5rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--stone);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* The small uppercase label every section opens with. */
.label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--sage-deep);
}

/* Header */

.site-header {
  padding: clamp(1.25rem, 3vw, 2rem) 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  flex: none;
  border-radius: 4px;
}

.brand img {
  width: auto;
  height: 28px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.lang-toggle {
  display: inline-flex;
  gap: 0.25rem;
}

.lang-toggle button {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.lang-toggle button:hover {
  color: var(--ink);
}

.lang-toggle button[aria-pressed="true"] {
  background: rgba(47, 52, 48, 0.07);
  color: var(--ink);
}

.sign-in {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.sign-in:hover {
  border-color: var(--ink);
  background: var(--paper);
}

/* Hero: one screen. The words sit high and left; the field rises from the bottom behind them. */

.hero {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 11rem);
  padding: clamp(2rem, 6vw, 5rem) 0 calc(var(--field) - 2rem);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 27ch;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 1.3rem + 4.4vw, 4.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 36rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
}

/* The field: pinned to the page's bottom edge, so the blades stand behind the footer's line.
   Three planes: far (hazy), mid (in focus), near (huge and soft), as a macro lens sees grass. */

.field {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: var(--field);
  display: block;
  overflow: hidden;
  pointer-events: none;
  /* The bases dissolve, so the footer's line and words stay clear. */
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
}

.far {
  fill: var(--sage-light);
  opacity: 0.55;
  filter: blur(5px);
}

.mid {
  stroke: rgba(74, 102, 84, 0.25);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.near {
  fill: var(--sage-deep);
  opacity: 0.5;
  filter: blur(14px);
}

.bokeh {
  filter: blur(6px);
}

.disc {
  transform-box: fill-box;
  transform-origin: center;
  animation: ordona-drift 16s ease-in-out infinite alternate;
}

.disc-2 { animation-duration: 21s; animation-delay: -6s; }
.disc-3 { animation-duration: 25s; animation-direction: alternate-reverse; }

@keyframes ordona-drift {
  from { transform: translate(-24px, 8px) scale(0.92); }
  to { transform: translate(24px, -14px) scale(1.1); }
}

/* Each blade sways about its base. Six timings, handed out when the blades were drawn, so the
   breeze reads as uneven; the near plane moves most, as the closest things do. */
.sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: ordona-rise 1.4s var(--ease) both, ordona-sway 8s ease-in-out infinite alternate;
}

.near .sway { animation-name: ordona-rise, ordona-sway-near; }
.far .sway { animation-name: ordona-rise, ordona-sway-far; }

.s1 { animation-delay: 0ms, -1s; animation-duration: 1.4s, 7s; }
.s2 { animation-delay: 100ms, -3s; animation-duration: 1.5s, 8s; }
.s3 { animation-delay: 200ms, -5s; animation-duration: 1.6s, 9s; }
.s4 { animation-delay: 300ms, -2s; animation-duration: 1.7s, 10s; }
.s5 { animation-delay: 400ms, -7s; animation-duration: 1.8s, 11s; }
.s6 { animation-delay: 500ms, -4s; animation-duration: 1.9s, 12s; }

@keyframes ordona-rise {
  from { opacity: 0; transform: scaleY(0.9); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes ordona-sway {
  from { transform: rotate(-1.8deg) skewX(-0.8deg); }
  to { transform: rotate(1.8deg) skewX(0.8deg); }
}

@keyframes ordona-sway-near {
  from { transform: rotate(-2.6deg); }
  to { transform: rotate(2.6deg); }
}

@keyframes ordona-sway-far {
  from { transform: rotate(-1deg); }
  to { transform: rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sway,
  .disc {
    animation: none;
  }
}

/* Footer: the company's name, per language, and the contact address. */

.site-footer {
  position: relative;
  z-index: 1;
  padding: 1.25rem 0 clamp(1.25rem, 3vw, 2rem);
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}

.footer-email {
  color: var(--ink);
}

.footer-email a {
  text-decoration-color: var(--sage);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

.footer-email a:hover {
  color: var(--sage-deep);
}

/* A fact site.json does not hold yet. Loud on purpose: it must not survive to the live site. */
.placeholder {
  padding: 0 0.3em;
  border-radius: 4px;
  background: rgba(214, 168, 58, 0.28);
  font-style: italic;
}

/* Not found */

.not-found {
  display: grid;
  align-content: center;
  gap: 2.5rem;
  min-height: 100vh;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.not-found .brand img {
  height: 28px;
}

.not-found h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  line-height: 1.1;
}

.not-found section p {
  margin-top: 0.75rem;
  color: var(--ink-2);
}

.not-found section + section {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* Phones: the logo, the toggle and "Sign in" share one row. */
@media (max-width: 26rem) {
  .brand img {
    height: 24px;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .lang-toggle button {
    min-width: 2.25rem;
  }

  .sign-in {
    padding: 0 0.8rem;
  }
}
