/* Brandsdal AS — brandsdal.io
   Tokens
   paper   #FBFCF9  a white with a breath of green
   ink     #131613
   quiet   #6E746C  secondary text
   rule    #E4E8E0  hairlines
   leaf    #6ACC43  brand light green (drawing, markers)
   moss    #258002  brand dark green (links, hover)
*/

:root {
  --paper: #fbfcf9;
  --ink: #131613;
  --quiet: #6e746c;
  --rule: #e4e8e0;
  --leaf: #6acc43;
  --moss: #258002;

  --display: "Jost", "Century Gothic", "Futura", system-ui, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  padding: 0 var(--gutter);
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--moss);
  text-decoration: underline;
}

a:focus-visible {
  outline: 1.5px solid var(--moss);
  outline-offset: 4px;
  border-radius: 2px;
}

p {
  margin: 0;
}

h1,
h2 {
  margin: 0;
  font-weight: 400;
}

/* ---------- header ---------- */

.top {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  height: 30px;
  width: auto;
  display: block;
}

.leaf--small { fill: var(--moss); }
.leaf--big { fill: var(--leaf); }

.brand__word {
  height: 17px;
  width: auto;
  display: block;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
  color: var(--quiet);
}

.nav a:hover {
  color: var(--moss);
}

/* ---------- hero ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3rem, 9vw, 7.5rem) 0 clamp(4rem, 10vw, 8rem);
}

.hero__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 13ch;
}

.hero__lead {
  margin-top: 1.75rem;
  max-width: 44ch;
  color: var(--quiet);
  font-size: 1.0625rem;
}

.hero__lead a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--leaf);
}

.hero__lead a:hover {
  color: var(--moss);
}

.hero__figure {
  margin: 0;
  justify-self: end;
  width: min(100%, 300px);
}

.drawing {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* The outline draws itself, then the shapes fill in softly so the mark
   ends as the real logo rather than a sketch of it. Dash lengths are the
   real path lengths in user units (perimeter of each leaf) with a small
   overshoot, so the closing edge is always drawn. pathLength and
   non-scaling-stroke are deliberately avoided: Chromium mis-scales dashes
   with them at some zoom levels, leaving the last segment missing. */
.stroke {
  stroke-width: 1.1;
  stroke-linejoin: miter;
  stroke-linecap: square;
  animation: draw 1.8s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.stroke--outer {
  stroke: var(--leaf);
  stroke-dasharray: 883;
  stroke-dashoffset: 883;
  animation-delay: 0.15s;
}

.stroke--inner {
  stroke: var(--leaf);
  stroke-dasharray: 563;
  stroke-dashoffset: 563;
  animation-delay: 0.65s;
  animation-duration: 1.5s;
}

.stroke--small {
  stroke: var(--moss);
  stroke-dasharray: 346;
  stroke-dashoffset: 346;
  animation-delay: 1.5s;
  animation-duration: 1.1s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.fill {
  opacity: 0;
  animation: bloom 1.4s ease-out forwards;
  animation-delay: 2.5s;
}

.fill--big { fill: var(--leaf); }
.fill--small { fill: var(--moss); }

@keyframes bloom {
  to { opacity: 0.16; }
}

/* ---------- sections ---------- */

.eyebrow {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}

.section__intro {
  color: var(--quiet);
  font-size: 0.9375rem;
}

/* work rows */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: grid;
  grid-template-columns: 1.25rem 9rem minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--rule);
  transition: color 160ms ease;
}

.row:first-child {
  border-top: 0;
}

.row__leaf {
  width: 0.8rem;
  height: 0.8rem;
  background: #d3dacd;
  border-radius: 0 50% 0 50%;
  align-self: center;
  transition: background 200ms ease, transform 200ms ease;
}

.row:hover .row__leaf {
  background: var(--leaf);
  transform: rotate(-90deg);
}

.row__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: -0.005em;
}

.row__desc {
  color: var(--quiet);
  font-size: 0.9375rem;
  max-width: 52ch;
}

.row__meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
  color: var(--quiet);
  white-space: nowrap;
}

.row__status {
  color: var(--moss);
}

.row__domain {
  font-variant-numeric: tabular-nums;
}

/* consulting */

.consulting {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.consulting__text {
  max-width: 62ch;
  padding: 0.25rem 0 0;
  color: var(--ink);
}

/* ---------- footer ---------- */

.foot {
  max-width: var(--measure);
  margin: clamp(4rem, 10vw, 8rem) auto 0;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.foot__col p {
  margin-top: 0.6rem;
}

.foot__col a {
  color: var(--ink);
}

.foot__note {
  grid-column: 1 / -1;
  margin-top: 2rem;
  font-size: 0.8125rem;
  color: var(--quiet);
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: clamp(2rem, 6vw, 4rem);
  }

  .hero__figure {
    justify-self: start;
    width: 150px;
    order: -1;
  }

  .row {
    grid-template-columns: 1.25rem minmax(0, 1fr);
    row-gap: 0.35rem;
  }

  .row__desc,
  .row__meta {
    grid-column: 2;
  }

  .row__meta {
    white-space: normal;
  }

  .section__head {
    flex-direction: column;
    gap: 0.5rem;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stroke {
    animation: none;
    stroke-dashoffset: 0;
  }
  .fill {
    animation: none;
    opacity: 0.16;
  }
  .row__leaf { transition: none; }
}
