/* Haume Made marketing site. Plain CSS, no build step. */

:root {
  --paper: #f5efe3;
  --paper-2: #ece4d3;
  --ink: #1f1c17;
  --ink-soft: #5b5446;
  --rule: #d6cbb5;
  --red: #c2412d;      /* pōhutukawa */
  --green: #2e6a4c;    /* kawakawa */
  --note: #fbe9a6;
  --note-ink: #3a3115;
  --code-bg: #1f1c17;
  --code-ink: #f5efe3;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Atkinson Hyperlegible", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f;
    --paper-2: #211e17;
    --ink: #ece5d6;
    --ink-soft: #a89f8c;
    --rule: #3a352a;
    --red: #e8674f;
    --green: #6fbf93;
    --note: #3b3418;
    --note-ink: #f3e7b8;
    --code-bg: #0c0b08;
    --code-ink: #ece5d6;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.6 var(--sans);
  overflow-x: hidden;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; font-variation-settings: "SOFT" 100, "WONK" 1; }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }
h3 { font-size: 1.35rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }

.hand { font-family: var(--hand); font-size: 1.6rem; line-height: 1.1; color: var(--red); }

/* ---------- nav ---------- */

.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; flex-wrap: wrap; }
.mark { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; text-decoration: none; letter-spacing: -.02em; }
.mark span { color: var(--red); }
.nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.nav ul a { text-decoration: none; font-size: 1rem; }
.nav ul a:hover { text-decoration: underline; }

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper) !important;
  text-decoration: none !important;
  padding: .55rem 1.1rem;
  border-radius: 999px 999px 999px 999px / 60% 70% 60% 80%;
  font-weight: 700;
  transition: transform .15s;
}
.btn:hover { transform: rotate(-2deg) scale(1.03); background: var(--red); }
.btn.big { font-size: 1.2rem; padding: .8rem 1.6rem; }

/* ---------- hero ---------- */

.hero { padding-top: clamp(1.5rem, 5vw, 4rem); padding-bottom: 2rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); margin: 0; max-width: 14ch; }
.hero h1 .scribble { position: relative; white-space: nowrap; color: var(--red); }
.hero h1 .scribble svg { position: absolute; left: -2%; bottom: -.18em; width: 104%; height: .35em; overflow: visible; }
.hero h1 .scribble path { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s .6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero h1 .scribble path { animation: none; stroke-dashoffset: 0; } }

.hero .lede { font-size: clamp(1.15rem, 2.4vw, 1.4rem); max-width: 38rem; margin-top: 1.75rem; color: var(--ink-soft); }
.hero .lede strong { color: var(--ink); }
.hero .cta { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* the animation */
.brain { margin-top: clamp(2rem, 5vw, 3.5rem); position: relative; }
.brain canvas { display: block; width: 100%; height: clamp(220px, 34vw, 380px); }
.said { display: flex; align-items: baseline; gap: .6rem; min-height: 2.6rem; font-size: clamp(1rem, 2.2vw, 1.25rem); }
.said .who { font-family: var(--hand); font-size: 1.5rem; color: var(--ink-soft); flex: none; }
.said .text { font-family: var(--serif); font-style: italic; }
.said.out { justify-content: flex-end; text-align: right; }
.said.out .text { color: var(--green); }
.said .text::after { content: ""; display: inline-block; width: .5ch; }
.said.typing .text::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--ink-soft); font-style: normal; }
@keyframes blink { 50% { opacity: 0; } }
.brain .caption { font-family: var(--hand); color: var(--ink-soft); font-size: 1.25rem; text-align: center; margin-top: .25rem; }

/* ---------- sections ---------- */

section { padding: clamp(3rem, 8vw, 6rem) 0; }
section + section { border-top: 1.5px dashed var(--rule); }

.two { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 52rem) { .two { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 3rem; margin-bottom: 1.25rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.15rem; font-family: var(--hand); font-size: 2.2rem; color: var(--red); line-height: 1; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 1.9rem; position: relative; margin-bottom: .75rem; }
.ticks li::before { content: "✓"; position: absolute; left: .2rem; top: -.05rem; font-family: var(--hand); font-size: 1.5rem; color: var(--green); transform: rotate(-8deg); }
.ticks b { font-weight: 700; }

.aside { font-family: var(--hand); font-size: 1.45rem; color: var(--ink-soft); transform: rotate(-1.5deg); margin-top: 1.5rem; }

/* who it's for */
.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 46rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--paper-2); padding: 1.5rem; border-radius: 6px 14px 8px 12px; border: 1.5px solid var(--rule); }
.card:nth-child(1) { transform: rotate(-.6deg); }
.card:nth-child(2) { transform: rotate(.5deg); }
.card:nth-child(3) { transform: rotate(-.3deg); }
.card .eg { font-family: var(--hand); font-size: 1.35rem; color: var(--red); line-height: 1.2; margin-top: .75rem; }

/* pricing */
.price-wrap { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 52rem) { .price-wrap { grid-template-columns: 1.1fr .9fr; gap: 4rem; } }
.price { background: var(--paper-2); border: 2px solid var(--ink); border-radius: 10px 18px 12px 16px; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: 6px 6px 0 var(--ink); }
.price .amount { font-family: var(--serif); font-size: clamp(3.5rem, 10vw, 5rem); font-weight: 700; line-height: 1; }
.price .amount small { font-size: 1.1rem; font-weight: 400; font-family: var(--sans); color: var(--ink-soft); }
.price .per { margin: .5rem 0 1.5rem; color: var(--ink-soft); }
.note { background: var(--note); color: var(--note-ink); padding: 1.25rem 1.4rem; transform: rotate(1.2deg); box-shadow: 0 6px 14px rgba(0,0,0,.12); font-size: 1.05rem; }
.note .hand { color: inherit; font-size: 1.7rem; display: block; margin-bottom: .4rem; }
.note p:last-child { margin-bottom: 0; }

/* about */
.about { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .about { grid-template-columns: 14rem 1fr; gap: 3rem; } }
.portrait { width: 12rem; aspect-ratio: 1; border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%; background: var(--paper-2); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--hand); font-size: 1.3rem; color: var(--ink-soft); text-align: center; transform: rotate(-3deg); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.about .body { max-width: 40rem; }
.sig { font-family: var(--hand); font-size: 2.4rem; color: var(--red); transform: rotate(-4deg); display: inline-block; margin-top: .5rem; }

/* contact */
.contact .big-email { font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.8rem); font-weight: 600; word-break: break-word; }

/* footer */
footer { padding: 2.5rem 0 3rem; border-top: 1.5px dashed var(--rule); color: var(--ink-soft); font-size: .95rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- get started page ---------- */

.prompt { position: relative; margin: 1.5rem 0; }
.prompt pre {
  background: var(--code-bg); color: var(--code-ink);
  font: .95rem/1.55 var(--mono);
  padding: 3rem 1.4rem 1.5rem; margin: 0;
  border-radius: 8px 14px 10px 12px;
  white-space: pre-wrap; word-break: break-word;
}
.prompt button {
  position: absolute; top: .75rem; right: .75rem;
  font: 700 .9rem var(--sans);
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 999px; padding: .4rem .9rem; cursor: pointer;
}
.prompt button:hover { background: var(--red); color: #fff; }
code { font-family: var(--mono); font-size: .9em; background: var(--paper-2); padding: .1em .35em; border-radius: 4px; }
pre code { background: none; padding: 0; }
.big-steps { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: s; }
.big-steps > li { counter-increment: s; position: relative; padding-left: clamp(0rem, 8vw, 4.5rem); margin-bottom: 3.5rem; }
.big-steps > li::before { content: counter(s); font-family: var(--hand); color: var(--red); font-size: 3.5rem; line-height: 1; display: block; }
@media (min-width: 40rem) { .big-steps > li::before { position: absolute; left: 0; top: -.4rem; } }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--ink-soft); }

/* contact form */
.contact-form { display: grid; gap: 1rem; margin: 1.5rem 0; }
.contact-form label { display: grid; gap: .3rem; font-weight: 700; }
.contact-form input, .contact-form textarea {
  font: 400 1.05rem/1.5 var(--sans); color: var(--ink);
  background: var(--paper-2); border: 1.5px solid var(--ink);
  border-radius: 6px 10px 7px 9px; padding: .65rem .8rem; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid var(--red); outline-offset: 1px; }
.contact-form button { justify-self: start; border: 0; cursor: pointer; font-family: var(--sans); }
.form-error { background: var(--note); color: var(--note-ink); padding: .75rem 1rem; border-left: 4px solid var(--red); }

/* "$10" crossed out, "free!" scrawled over it */
.price .amount { position: relative; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.price .struck { position: relative; color: var(--ink-soft); }
.price .struck svg { position: absolute; inset: 10% -6% 0; width: 112%; height: 80%; overflow: visible; }
.price .struck path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.price .free { font-family: var(--hand); font-weight: 700; color: var(--red); font-size: clamp(3rem, 9vw, 4.4rem); line-height: 1; transform: rotate(-9deg) translateY(-.6rem); margin-left: .25rem; }
.price .free-note { font-family: var(--hand); font-size: 1.35rem; color: var(--red); }

.portrait-wrap { margin: 0; justify-self: start; }
.portrait-wrap figcaption { font-size: 1.4rem; margin: .6rem 0 0 4.5rem; transform: rotate(-4deg); }
.portrait-wrap figcaption::before { content: "↖ "; }
/* square-ish rather than round, so the cat keeps its head */
.portrait { width: 13rem; border-radius: 14px 22px 16px 26px / 20px 14px 24px 16px; box-shadow: 5px 5px 0 var(--ink); }
.portrait-wrap figcaption { margin-left: 5.5rem; }
.portrait-wrap figcaption { white-space: nowrap; margin-left: 4rem; }
/* Open Props --radius-blob-1 */
.portrait { border-radius: 30% 70% 70% 30% / 53% 30% 70% 47%; }
.portrait { box-shadow: none; background: none; }
/* bigger About photo */
.portrait { width: min(16rem, 100%); }
@media (min-width: 52rem) { .about { grid-template-columns: 17rem 1fr; } }
.portrait-wrap figcaption { margin-left: 6rem; }
