/* ==========================================================================
   Swiss Ivy Lab

   Layout idea: the page is the logo, stretched. The leaves sit top left, the
   stem runs down the left margin, a small leaf sprouts at every section, and
   the hand lettering with the ground symbol closes the page.

   Type: Shantell Sans (hand-drawn, like the logo lettering) for headings and
   prices, Barlow (close to technical-drawing lettering) for everything else.
   Both fonts are served from this site, nothing is loaded from third parties.
   ========================================================================== */

@font-face { font-family: "Shantell Sans"; src: url("fonts/shantell-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Colours: the two logo colours on white, plus three supporting tones */
  --ink: #000000;        /* logo line colour */
  --paper: #ffffff;
  --ivy: #008000;        /* logo leaf green */
  --ivy-deep: #005e00;   /* hover and pressed states */
  --leaf-tint: #e7f3e0;  /* quiet surfaces */
  --stone: #55605a;      /* secondary text */
  --signal: #ffd43b;     /* notices only */

  --display: "Shantell Sans", "Comic Neue", "Trebuchet MS", system-ui, sans-serif;
  --body: "Barlow", "DIN Alternate", "Segoe UI", system-ui, sans-serif;

  /* Geometry: --u is the size of one unit of the logo drawing. The plant,
     the stem, the sprouts and the ground symbol all scale with it. */
  --u: 1.15px;
  --edge: 32px;                 /* side gutter */
  --plant-x: 24px;              /* left edge of the leaves, from the page edge */
  --plant-y: 12px;
  --indent-gap: 24px;
  --gap: clamp(80px, 9vw, 128px);   /* space above each section */
  --ground-bottom: 32px;
  --rail: calc(var(--plant-x) + 63.15 * var(--u));                       /* centre of the stem */
  --indent: calc(var(--rail) + 3.5 * var(--u) + var(--indent-gap));      /* left edge of the content */

  color-scheme: light;
}

@media (max-width: 1000px) {
  :root { --u: 1px; --edge: 24px; --plant-x: 14px; --indent-gap: 20px; }
}
@media (max-width: 700px) {
  :root { --u: 0.72px; --edge: 16px; --plant-x: 4px; --plant-y: 8px; --indent-gap: 12px; --gap: 72px; --ground-bottom: 24px; }
}
@media (max-width: 350px) {
  :root { --u: 0.64px; --edge: 12px; --indent-gap: 10px; }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--body);
}

img, svg { max-width: 100%; }
p { margin: 0 0 1em; max-width: 34em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }

a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--ivy); text-decoration-thickness: 3px; text-underline-offset: 4px; }
a:hover { color: var(--ivy-deep); }

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

h1, h2, h3 { font-family: var(--display); text-wrap: balance; overflow-wrap: break-word; }
h1 { font-weight: 750; font-size: clamp(2rem, 1rem + 5.6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.01em; margin: 0 0 0.45em; max-width: 13em; }
h2 { font-weight: 700; font-size: clamp(1.75rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.05; margin: 0 0 0.45em; }
h3 { font-weight: 700; font-size: clamp(1.375rem, 1.2rem + 1vw, 1.875rem); line-height: 1.15; margin: 0 0 0.4em; }

/* Language switch: both languages are in the page, one is shown. */
html[data-lang="de"] [data-l="en"],
html[data-lang="en"] [data-l="de"] { display: none !important; }

[hidden] { display: none !important; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- The plant: leaves, stem, sprouts, ground ---------- */

.page { position: relative; max-width: 1180px; margin-inline: auto; }

.plant {
  position: absolute;
  left: var(--plant-x);
  top: var(--plant-y);
  width: calc(132 * var(--u));
  height: calc(137 * var(--u));
  max-width: none;
  pointer-events: none;
}

.stem {
  position: absolute;
  left: calc(var(--rail) - 14 * var(--u));
  top: calc(var(--plant-y) + 136 * var(--u));
  bottom: calc(var(--ground-bottom) + 21 * var(--u));
  width: calc(28 * var(--u));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='300' viewBox='0 0 28 300'%3E%3Cpath d='M14,-4V0C14,30 19,45 19,75C19,105 14,120 14,150C14,180 9,195 9,225C9,255 14,270 14,300V304' fill='none' stroke='%23000' stroke-width='7.067'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: calc(28 * var(--u)) calc(300 * var(--u));
  pointer-events: none;
}

.sprout {
  position: absolute;
  left: calc(var(--rail) - 58.18 * var(--u));
  top: calc(var(--gap) + 0.55em - 30 * var(--u));
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  max-width: none;
  pointer-events: none;
}

.ground {
  position: absolute;
  left: calc(var(--rail) - 25.15 * var(--u));
  bottom: var(--ground-bottom);
  width: calc(51 * var(--u));
  height: calc(26 * var(--u));
  max-width: none;
  pointer-events: none;
}

/* One moment of motion: on load the plant draws itself, bottom up. */
@media (prefers-reduced-motion: no-preference) {
  .plant .draw { stroke-dasharray: 1 2; stroke-dashoffset: 1.02; animation: draw 0.6s ease-out forwards; }
  .plant .d-stem { animation-duration: 0.7s; animation-delay: 0.1s; }
  .plant .d-branch { animation-duration: 0.3s; animation-delay: 0.45s; }
  .plant .d-small { animation-delay: 0.7s; }
  .plant .d-big { animation-duration: 0.7s; animation-delay: 0.75s; }
  .plant .d-vein { animation-duration: 0.35s; animation-delay: 1.3s; }
  .plant .fill { opacity: 0; animation: appear 0.4s ease-out forwards; }
  .plant .f-small { animation-delay: 1.25s; }
  .plant .f-big { animation-delay: 1.35s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 36px);
  min-height: calc(var(--plant-y) + 106 * var(--u));
  padding: 0 var(--edge) 0 calc(var(--plant-x) + 132 * var(--u) + 10px);
}

.brand { margin-right: auto; font: 700 clamp(1.125rem, 0.8rem + 1.6vw, 1.625rem)/1.1 var(--display); color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }

.nav { display: flex; gap: clamp(16px, 2.4vw, 32px); }
.nav a { font-weight: 600; text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--ivy); }

.lang { display: flex; flex: none; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang button { font: 600 0.9375rem/1 var(--body); padding: 8px 12px; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:focus-visible { outline-offset: -3px; border-radius: 999px; }

@media (max-width: 860px) {
  .nav { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 700 1.0625rem/1.2 var(--body);
  padding: 0.8em 1.35em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--ivy);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--ivy-deep); color: #fff; }
.btn:focus-visible { border-radius: 999px; }
.btn--quiet { background: var(--paper); color: var(--ink); }
.btn--quiet:hover { background: var(--leaf-tint); color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }

/* ---------- Hero ---------- */

.hero { padding: clamp(20px, 4vw, 56px) var(--edge) 0 var(--indent); }
.hero .lede { font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem); line-height: 1.45; max-width: 30em; }

/* ---------- Sections ---------- */

.section { position: relative; padding: var(--gap) var(--edge) 0 var(--indent); }
.lede { font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem); line-height: 1.5; max-width: 32em; }

.split { display: grid; gap: clamp(28px, 4vw, 64px); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .split--form { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

/* ---------- Products ---------- */

/* Phone: name and price, then photos, then details. Desktop: photos left, text right. */
.product { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px clamp(20px, 3.4vw, 48px); margin-top: clamp(40px, 6vw, 72px); grid-template-areas: "head" "shots" "facts"; }
.product-head { grid-area: head; }
.product-head h3 { margin-bottom: 0.2em; }
.shots { grid-area: shots; }
.facts { grid-area: facts; }
.facts > :first-child { margin-top: 0; }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr; grid-template-areas: "shots head" "shots facts"; align-items: start; row-gap: 20px; }
  .product--small { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); row-gap: 6px; }
}

.shots { display: grid; gap: 14px; align-content: start; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 20px; background: var(--leaf-tint); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.shot figcaption { margin-top: 8px; font-size: 0.9375rem; line-height: 1.4; color: var(--stone); }
.product--small .shot { max-width: 320px; }

.price { font: 750 clamp(2.25rem, 1.8rem + 1.6vw, 3rem)/1 var(--display); margin: 0.15em 0 0; }
.price-note { font-size: 0.9375rem; color: var(--stone); margin: 0.5em 0 0; }

.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 34em;
  margin: 20px 0;
  padding: 14px 16px;
  background: var(--signal);
  border: 3px solid var(--ink);
  border-radius: 14px;
  line-height: 1.4;
}
.notice svg { width: 28px; height: 28px; flex: none; }
.notice strong { font-weight: 700; }

.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 22px 0 26px; max-width: 34em; }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; }

.prices { width: 100%; max-width: 34em; margin: 18px 0 14px; border-collapse: collapse; }
.prices th { font-weight: 400; text-align: left; padding: 11px 16px 11px 0; vertical-align: baseline; }
.prices td { font: 700 1.375rem/1.2 var(--display); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; padding: 11px 0; vertical-align: baseline; }
.prices tr { border-top: 2px solid var(--ink); }
.prices tr:last-child { border-bottom: 2px solid var(--ink); }
.hint { font-size: 1rem; color: var(--stone); }

.terms { margin-top: clamp(48px, 7vw, 88px); padding: clamp(22px, 3.4vw, 40px); background: var(--leaf-tint); border-radius: 24px; }
.terms dl { display: grid; gap: 4px 32px; margin: 0; }
.terms dt { font-weight: 600; }
.terms dd { margin: 0 0 12px; max-width: 36em; }
.terms dd:last-child { margin-bottom: 0; }
.terms .fineprint { margin-top: 18px; }
@media (min-width: 760px) {
  .terms dl { grid-template-columns: 9em minmax(0, 1fr); row-gap: 14px; }
  .terms dd { margin-bottom: 0; }
}

/* ---------- Custom work ---------- */

.ask { border-top: 3px solid var(--ink); padding-top: 20px; }
.ask ul { margin: 0 0 24px; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 32em; }
.ask li { position: relative; padding-left: 1.4em; }
.ask li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--ivy); }

/* ---------- Contact ---------- */

.steps { list-style: none; counter-reset: step; margin: 0 0 28px; padding: 0; display: grid; gap: 16px; max-width: 30em; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.1em minmax(0, 1fr); align-items: baseline; }
.steps li::before { content: counter(step); font: 750 1.75rem/1 var(--display); color: var(--ivy); }

.form { scroll-margin-top: 20px; display: grid; gap: 22px; padding: clamp(18px, 3vw, 34px); border: 3px solid var(--ink); border-radius: 24px; background: var(--paper); }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend, .form label.lbl { display: block; padding: 0; margin: 0 0 7px; font-weight: 600; }
.form .opt { font-weight: 400; color: var(--stone); }
.form input[type="text"], .form input[type="email"], .form input[type="number"], .form textarea {
  display: block;
  width: 100%;
  font: 400 1.0625rem/1.4 var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 0.6em 0.75em;
}
.form textarea { resize: vertical; min-height: 8em; }
.form input:focus-visible, .form textarea:focus-visible { outline-offset: 2px; border-radius: 10px; }
.fields { display: grid; gap: 22px; }
.row { display: grid; gap: 18px; }
@media (min-width: 560px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row--qty { grid-template-columns: 7.5em minmax(0, 1fr); }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-block; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip .c { display: inline-block; padding: 0.45em 1em; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 500; line-height: 1.3; }
.chip input:checked + .c { background: var(--ivy); color: #fff; font-weight: 600; }
.chip input:hover:not(:checked) + .c { background: var(--leaf-tint); }
.chip input:focus-visible + .c { outline: 3px solid var(--ivy); outline-offset: 3px; }
.help { margin: 7px 0 0; font-size: 0.9375rem; line-height: 1.4; color: var(--stone); }
.fineprint { font-size: 0.9375rem; line-height: 1.45; color: var(--stone); }
.send { display: grid; gap: 14px; justify-items: start; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* With JavaScript, only the fields that fit the chosen topic are shown. */
.js .grp:not(.is-on) { display: none; }

.msg { padding: 12px 16px; border: 3px solid var(--ink); border-radius: 14px; line-height: 1.4; }
.msg--error { background: var(--signal); }
.msg--preview { background: var(--leaf-tint); }
.sent { padding: 6px 0; }
.sent:focus { outline: none; }

/* ---------- Footer: the lower half of the logo ---------- */

.foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-top: var(--gap);
  padding: 0 var(--edge) calc(var(--ground-bottom) + 30 * var(--u)) var(--indent);
}
.lettering { display: block; width: calc(68 * var(--u) * 1.35); height: auto; flex: none; margin-left: calc(-1 * var(--indent-gap) + 12 * var(--u)); }
.foot-info { display: grid; gap: 6px; justify-items: end; text-align: right; font-size: 0.9375rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; }
.foot-info p { margin: 0; color: var(--stone); }
@media (max-width: 700px) {
  .foot { flex-direction: column-reverse; align-items: flex-start; }
  .foot-info { justify-items: start; text-align: left; }
  .foot-links { justify-content: flex-start; }
}

/* ---------- Legal and service pages ---------- */

.plain { padding: clamp(20px, 4vw, 56px) var(--edge) 0 var(--indent); }
.plain h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }
.plain h2 { font-size: clamp(1.625rem, 1.4rem + 1vw, 2.125rem); margin-top: 0; }
.plain h3 { font-size: 1.3125rem; margin-top: 1.5em; }
.plain address { font-style: normal; margin: 0 0 1em; }
.plain ul { margin: 0 0 1em; padding-left: 1.2em; max-width: 34em; }
.plain li { margin-bottom: 0.35em; }
.plain .updated { color: var(--stone); font-size: 0.9375rem; }
.plain section { margin-top: clamp(40px, 6vw, 72px); scroll-margin-top: 24px; }
.plain h1 + section { margin-top: clamp(24px, 4vw, 40px); }

/* ---------- Very narrow phones ---------- */

@media (max-width: 350px) {
  .top { gap: 8px; }
  .brand { font-size: 1rem; }
  .lang button { padding: 7px 9px; font-size: 0.875rem; }
}
