/* レシピ再計算 — site styles.
   Palette follows the app (design.md): tangerine enamel, cream ceramic, honey results,
   and the roasted-brown night kitchen used on the App Store screenshots. */

:root {
  --roast-900: #1c130c;
  --roast-800: #241910;
  --roast-700: #3a281b;
  --roast-600: #4a3222;
  --orange-900: #8f3b10;
  --orange-700: #e06c18;
  --orange-600: #ff8a2a;
  --orange-150: #ffe0bf;
  --orange-100: #fff0de;
  --cream-050: #fffcf6;
  --cream-100: #fff4e3;
  --paper-100: #fff9f0;
  --paper-200: #ffe9cc;
  --honey-700: #c46b12;
  --honey-500: #f2a33a;
  --honey-100: #ffe7b8;
  --ink-900: #2e2118;
  --ink-650: #684c38;
  --ink-450: #9a7c62;

  --display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --num: "Fraunces", "Zen Maru Gothic", serif;

  --radius-card: 22px;
  --gutter: clamp(16px, 5vw, 40px);
  --max: 1120px;
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink-900);
  background: var(--paper-100);
  line-height: 1.75;
  font-feature-settings: "palt" 1;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--orange-700); text-underline-offset: 3px; }
a:hover { color: var(--orange-900); }

.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }

/* Paper grain — a whisper of texture over the cream sections. */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .5;
  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 type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .38 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── Header ───────── */
.site-head {
  position: absolute; inset: 0 0 auto; z-index: 10;
  padding-block: 18px;
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--cream-100); text-decoration: none;
  font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: .02em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 10px #0006; }
.brand:hover { color: #fff; }
.nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.nav a {
  color: #fff4e3c0; text-decoration: none; font-size: 14px; font-weight: 700;
}
.nav a:hover { color: var(--orange-600); }

.page-light .site-head { position: static; background: var(--roast-800); }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  color: var(--cream-100);
  background:
    radial-gradient(60% 55% at 70% 62%, #ff8a2a40 0%, transparent 70%),
    radial-gradient(40% 40% at 8% 10%, #c46b1226 0%, transparent 70%),
    linear-gradient(170deg, var(--roast-600) 0%, var(--roast-800) 55%, var(--roast-900) 100%);
  padding: clamp(104px, 14vw, 148px) 0 clamp(72px, 10vw, 120px);
  overflow: hidden;
}
/* Faint measuring-line ruler running across the hero. */
.hero::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background:
    repeating-linear-gradient(90deg, #fff4e322 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, #fff4e344 0 1px, transparent 1px 60px);
  mask: linear-gradient(to top, #000, transparent);
  -webkit-mask: linear-gradient(to top, #000, transparent);
}
.hero-grid {
  display: grid; gap: clamp(36px, 6vw, 72px);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .12em;
  color: var(--orange-600);
  border: 1.5px solid #ff8a2a66; border-radius: 999px; padding: 4px 14px;
}
.hero h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(34px, 5.4vw, 72px); line-height: 1.16; letter-spacing: -.01em;
  margin: 22px 0 22px;
}
.hero h1 em {
  font-style: normal; color: var(--orange-600);
  background: linear-gradient(transparent 68%, #ff8a2a38 68% 92%, transparent 92%);
}
.hero h1 .nw { white-space: nowrap; }
@media (max-width: 860px) { .hero h1 { font-size: clamp(34px, 9.6vw, 64px); } }
.lead { font-size: clamp(16px, 2vw, 18px); color: #fff4e3d9; max-width: 30em; margin: 0 0 32px; }

.store-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--cream-100); color: var(--roast-800);
  border-radius: 16px; padding: 12px 22px 12px 18px; text-decoration: none;
  font-weight: 700; box-shadow: 0 10px 30px -8px #ff8a2a80, inset 0 -3px 0 #e9cfa9;
  transition: transform .2s, box-shadow .2s;
}
.btn-store:hover { color: var(--roast-900); transform: translateY(-2px); box-shadow: 0 16px 36px -8px #ff8a2a99, inset 0 -3px 0 #e9cfa9; }
.btn-store svg { width: 26px; height: 26px; }
.btn-store small { display: block; font-size: 11px; font-weight: 500; line-height: 1.2; opacity: .75; }
.btn-store span { line-height: 1.25; font-size: 17px; }
.cta-note { font-size: 13px; color: #fff4e399; }

/* Load choreography */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .17s; } .d3 { animation-delay: .29s; }
.d4 { animation-delay: .41s; } .d5 { animation-delay: .6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ───────── Live recalculator card ───────── */
.calc {
  position: relative;
  background: var(--cream-050); color: var(--ink-900);
  border-radius: 28px; padding: 22px 22px 18px;
  box-shadow: 0 40px 80px -30px #000c, 0 0 0 1px #ffffff14, inset 0 -4px 0 #f1dfc4;
  transform: rotate(1.2deg);
}
.calc::before { /* recipe-card tab */
  content: "親子丼 · 2人分のレシピ";
  position: absolute; top: -15px; left: 26px;
  background: var(--orange-600); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  padding: 4px 14px; border-radius: 999px; box-shadow: 0 6px 14px -4px #ff8a2a99;
}
.calc-have {
  background: var(--paper-200); border-radius: 18px; padding: 14px 16px 12px; margin-top: 8px;
}
.calc-have-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.calc-have label { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--orange-900); }
.calc-have output {
  font-family: var(--num); font-weight: 700; font-size: 34px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink-900);
}
.calc-have output small { font-family: var(--display); font-size: 16px; margin-left: 2px; color: var(--ink-650); }
.calc-hint { font-size: 12px; color: var(--ink-650); margin: 2px 0 8px; }
.calc-ratio {
  display: inline-block; margin-left: 6px;
  font-family: var(--num); font-weight: 700; font-size: 13px;
  background: var(--honey-100); color: var(--honey-700); border-radius: 999px; padding: 1px 9px;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0;
  touch-action: pan-y;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--orange-600) var(--p, 40%), #e8cfae var(--p, 40%));
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: #e8cfae; }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--orange-600); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 3px solid var(--orange-600); box-shadow: 0 4px 10px -2px #8f3b1066;
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--orange-600); cursor: grab;
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px #ff8a2a55; }

.ing { list-style: none; margin: 14px 0 0; padding: 0; }
.ing li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 4px; border-bottom: 1.5px dashed #ecd8bd;
  font-family: var(--display); font-weight: 700; font-size: 16px;
}
.ing li:last-child { border-bottom: 0; }
.ing .amt { text-align: right; white-space: nowrap; }
.ing .amt b {
  font-family: var(--num); font-weight: 700; font-size: 22px; color: var(--honey-700);
  font-variant-numeric: tabular-nums; display: inline-block; transition: transform .25s;
}
.ing .amt b.tick { animation: tick .35s ease; }
@keyframes tick { 40% { transform: translateY(-3px) scale(1.06); } }
.ing .unit { font-size: 13px; color: var(--ink-650); margin-left: 2px; }
.ing .was { display: block; font-family: var(--body); font-weight: 500; font-size: 11px; color: var(--ink-450); line-height: 1.2; }
.ing li.base .amt b { color: var(--ink-900); }

/* ───────── Sections ───────── */
section { padding: clamp(72px, 10vw, 128px) 0; }
.sec-label {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .16em;
  color: var(--orange-700); margin: 0 0 10px;
}
.sec-title {
  font-family: var(--display); font-weight: 900; font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.3; margin: 0 0 18px;
}
.sec-lead { color: var(--ink-650); max-width: 36em; margin: 0; }

/* Feature rows: alternating phone + copy, slightly overlapping numbered cards. */
.features { display: grid; gap: clamp(64px, 9vw, 112px); margin-top: clamp(48px, 7vw, 80px); }
.feature { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: 1fr 300px; }
.feature:nth-child(even) .phone { order: 2; }
.feature h3 {
  font-family: var(--display); font-weight: 900; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.35; margin: 0 0 14px;
}
.feature h3 em { font-style: normal; color: var(--orange-700); }
.feature p { color: var(--ink-650); margin: 0; max-width: 28em; }
.num {
  font-family: var(--num); font-style: italic; font-weight: 700; font-size: 64px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--orange-600); display: block; margin-bottom: 8px;
}

.phone {
  position: relative; width: 100%; max-width: 300px; justify-self: center;
  border-radius: 46px; padding: 10px; background: var(--roast-800);
  box-shadow: 0 30px 60px -24px #8f3b1088, inset 0 0 0 2px #5a4030;
  transform: rotate(-2deg); transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.feature:nth-child(even) .phone { transform: rotate(2deg); }
.phone:hover { transform: rotate(0) translateY(-4px); }
.phone img { border-radius: 37px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--paper-200); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Promise strip */
.promise { background: var(--cream-100); border-block: 1.5px solid #f1dfc4; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.promise-card {
  background: var(--cream-050); border-radius: var(--radius-card); padding: 24px;
  box-shadow: inset 0 -3px 0 #f1dfc4;
}
.promise-card h3 { font-family: var(--display); font-weight: 900; font-size: 19px; margin: 12px 0 6px; }
.promise-card p { color: var(--ink-650); font-size: 15px; margin: 0; }
.promise-card svg { width: 40px; height: 40px; }

/* Closing CTA */
.closing {
  text-align: center; color: var(--cream-100);
  background:
    radial-gradient(50% 70% at 50% 100%, #ff8a2a44 0%, transparent 70%),
    var(--roast-800);
}
.closing .sec-title { color: var(--cream-100); }
.closing .store-cta { justify-content: center; margin-top: 28px; }
.closing img.icon { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 22px; box-shadow: 0 14px 40px -10px #ff8a2aaa; }

/* ───────── Footer ───────── */
.site-foot { background: var(--roast-900); color: #fff4e380; font-size: 13px; padding: 32px 0 40px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: #fff4e3cc; text-decoration: none; }
.site-foot a:hover { color: var(--orange-600); }

/* ───────── Document pages (support / privacy) ───────── */
.doc-hero {
  background: linear-gradient(170deg, var(--roast-600), var(--roast-800));
  color: var(--cream-100); padding: 56px 0 64px;
}
.doc-hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 5vw, 46px); margin: 8px 0 0; line-height: 1.3; }
.doc-hero p { margin: 10px 0 0; color: #fff4e3b3; }
.doc { padding: 0 0 96px; }
.doc .sheet {
  max-width: 780px; margin: -32px auto 0; background: var(--cream-050);
  border-radius: 26px; padding: clamp(24px, 5vw, 52px);
  box-shadow: 0 30px 60px -36px #8f3b1066, inset 0 -3px 0 #f1dfc4;
}
.doc h2 {
  font-family: var(--display); font-weight: 900; font-size: 21px; margin: 2.2em 0 .6em;
  padding-left: 14px; border-left: 4px solid var(--orange-600); line-height: 1.4;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-family: var(--display); font-weight: 700; font-size: 17px; margin: 1.6em 0 .4em; color: var(--orange-900); }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: .35em; }
.doc code { background: var(--paper-200); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
.doc .meta { color: var(--ink-450); font-size: 14px; }

.faq details {
  border-bottom: 1.5px dashed #ecd8bd; padding: 4px 0;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 36px 14px 0; position: relative;
  font-family: var(--display); font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%;
  font-family: var(--num); font-size: 26px; color: var(--orange-600); transition: rotate .25s;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0 0 16px; color: var(--ink-650); }

.contact-card {
  margin-top: 40px; background: var(--orange-100); border-radius: 20px; padding: 24px;
  display: grid; gap: 12px;
}
.contact-card h2 { margin-top: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--orange-600); color: #fff; text-decoration: none; font-weight: 700;
  border-radius: 14px; padding: 13px 20px; box-shadow: inset 0 -3px 0 #e06c18;
}
.btn:hover { color: #fff; background: var(--orange-700); }
.btn.ghost { background: transparent; color: var(--orange-900); box-shadow: inset 0 0 0 2px #ff8a2a88; }
.btn.ghost:hover { background: #ff8a2a1a; color: var(--orange-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .calc { transform: none; max-width: 460px; margin: 18px auto 0; width: 100%; }
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .phone { order: 0; }
  .phone { max-width: 250px; }
  .promise-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .nav a.hide-sm { display: none; }
  .brand span { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .reveal { opacity: 1; transform: none; }
}
