/* Bunrise design tokens. Source of truth: brands/bunrise/BRAND.md.
   Contrast figures are measured with brands/bunrise/tokens/contrast.py. */

@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito-var-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-var-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colours */
  --cream: #FFF6E9;        /* ground */
  --butter: #FFE9C7;       /* second ground */
  --peach: #FF9E80;        /* the brand accent */
  --peach-soft: #FFC4AD;
  --cocoa: #3B2416;        /* ink. 13.5:1 on cream, 7.2:1 on peach */
  --night: #1B110A;        /* the 6am screen */
  --oat: #7A6453;          /* muted text. 5.2:1 on cream */
  --night-cream: #F5E9D8;  /* text on night, softer than cream */

  /* The bun. Gold is the bun's body and nothing else. */
  --bun: #F2A94E;
  --toast: #C97A2B;
  --crust: #8F4E12;        /* the only gold that may be text: 6.0:1 on cream */

  /* Status */
  --sprout: #2E7D4F;
  --berry: #B4233C;

  /* Type */
  --display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem);
  --step-3: clamp(2.1rem, 1.5rem + 3vw, 4rem);
  --step-4: clamp(2.7rem, 1.6rem + 5.2vw, 6rem);

  /* Space and shape */
  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 34rem;
  --r-s: 12px;
  --r-m: 22px;
  --r-l: 36px;
  --r-pill: 999px;

  /* Motion. UI moves fast and plain; only the bun bounces. */
  --dur-press: 90ms;
  --dur-ui: 180ms;
  --dur-enter: 280ms;
  --stagger: 60ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring-bun: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-bun-time: 600ms;
  --spring-pop: cubic-bezier(0.34, 1.3, 0.64, 1);
  --spring-pop-time: 450ms;
  --spring-soft: var(--ease-out);
  --spring-soft-time: 500ms;
}

@supports (animation-timing-function: linear(0, 1)) {
  :root {
    /* stiffness 180, damping 12: bouncy, peaks at 1.21. The bun only. */
    --spring-bun: linear(0, 0.137, 0.437, 0.758, 1.011, 1.159, 1.208, 1.184, 1.123, 1.056, 1.002, 0.969, 0.957, 0.961, 0.973, 0.987, 0.999, 1.006, 1.009, 1.008, 1.006, 1.003, 1, 0.999, 0.998, 0.998, 0.999, 1);
    --spring-bun-time: 1160ms;
    /* stiffness 260, damping 22: light overshoot. Counter digits, confirmations. */
    --spring-pop: linear(0, 0.065, 0.213, 0.394, 0.571, 0.725, 0.848, 0.938, 0.997, 1.033, 1.049, 1.053, 1.049, 1.041, 1.031, 1.022, 1.014, 1.008, 1.003, 1, 0.998, 0.997, 0.997, 0.997, 0.998, 0.998, 0.999, 1);
    --spring-pop-time: 660ms;
    /* stiffness 170, damping 26: no overshoot. The phone and panels. */
    --spring-soft: linear(0, 0.048, 0.154, 0.28, 0.406, 0.52, 0.618, 0.7, 0.767, 0.821, 0.863, 0.896, 0.921, 0.941, 0.956, 0.967, 0.975, 0.982, 0.987, 0.99, 0.993, 0.995, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
    --spring-soft-time: 720ms;
  }
}
