/*
 * Everything in this file is scoped to the seitomiru page only — base.css
 * and portal.css (and therefore the app.sakumori.com entrance page) are
 * never touched here. Section-specific class names are prefixed `sm-` to
 * keep them unambiguous; shared layout utility classes (.block,
 * .block__inner, .section-heading, .section-text, .shot, .device-note,
 * .store-badge, .feature*) intentionally reuse the same names honyomu.css
 * uses, since only one app stylesheet is ever loaded per page.
 *
 * Palette source: StudentMill/Utilities/StudentMillTheme.swift in the
 * student-mill-ios repo (SMColor.pageBackground / Color.accentColor /
 * AccentColor.colorset), not chosen freehand — see PR description for the
 * exact RGB values carried over.
 */

:root {
  --content-max: 1120px;
  --shots-max: 1040px;
  --text-max: 560px;

  --page-pad: 20px;

  --section-space-mobile: 72px;
  --section-space-desktop: 112px;

  --phone-shot-width-mobile: 220px;
  --phone-shot-width-desktop: 280px;
  --step-shot-width-mobile: 168px;
  --step-shot-width-desktop: 208px;

  --shot-radius: 22px;
  --shot-shadow: 0 18px 40px rgba(43, 32, 19, 0.14);

  /* Studentmill-only tints, carried over from the app's own design tokens. */
  --sm-warm-white: #fcfbf5;   /* SMColor.pageBackground */
  --sm-gold: #b8902e;         /* Color.accentColor / AccentColor.colorset */
  --sm-gold-soft: rgba(184, 144, 46, 0.28); /* SMColor.cardBorder */
  --sm-wash-cream: #f8f2e2;
  --sm-wash-green: #eef3e6;
  --sm-wash-orange: #fbe9dc;
  --sm-ink-deep: #2b2013;
}

@media (min-width: 700px) {
  :root {
    --page-pad: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --page-pad: 32px;
  }
}

body {
  background-color: var(--sm-warm-white);
}

/* ------------------------------------------------------------------------
   Layout primitives (shared shape with honyomu.css by design)
   ---------------------------------------------------------------------- */
.block {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-space-mobile) var(--page-pad);
}

@media (min-width: 860px) {
  .block {
    padding-block: var(--section-space-desktop);
  }
}

.block__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
}

.block__inner--shots {
  max-width: var(--shots-max);
}

.section-heading {
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  color: var(--sm-ink-deep);
  margin: 0 0 16px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.section-heading--center {
  text-align: center;
  margin: 0 auto 32px;
  max-width: var(--text-max);
}

.section-text {
  color: var(--ink);
  line-height: 1.85;
  margin: 0 0 20px;
  max-width: var(--text-max);
}

.device-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
}

/* Shared screenshot treatment: sizing via width custom properties only,
   never transform:scale, so nothing gets stretched or cropped. */
.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--shot-radius);
  box-shadow: var(--shot-shadow);
  border: 1px solid var(--sm-gold-soft);
}

.shot--sm-phone {
  width: var(--phone-shot-width-mobile);
}

@media (min-width: 860px) {
  .shot--sm-phone {
    width: var(--phone-shot-width-desktop);
  }
}

.shot--sm-step {
  width: var(--step-shot-width-mobile);
}

@media (min-width: 860px) {
  .shot--sm-step {
    width: var(--step-shot-width-desktop);
  }
}

.sm-shot-caption {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Decorative background shapes: plain CSS shapes only, no photography, no
   reproduction of any reference image's exact graphics. aria-hidden,
   always behind .block__inner (isolation:isolate + z-index). Static. */
.sm-shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 32px;
}

.sm-shape--staff {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(184, 144, 46, 0.16) 0,
      rgba(184, 144, 46, 0.16) 2px,
      transparent 2px,
      transparent 14px
    );
}

.sm-shape--notebook {
  background: var(--sm-wash-green);
}

.sm-shape--notebook::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 10%;
  bottom: 10%;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(43, 32, 19, 0.18) 0,
    rgba(43, 32, 19, 0.18) 6px,
    transparent 6px,
    transparent 18px
  );
}

.sm-shape--dot {
  background: radial-gradient(circle, rgba(184, 144, 46, 0.22) 0%, rgba(184, 144, 46, 0) 72%);
  border-radius: 9999px;
}

/* ------------------------------------------------------------------------
   1. sm-hero
   ---------------------------------------------------------------------- */
.sm-hero {
  background: var(--sm-warm-white);
  padding-top: calc(var(--section-space-mobile) - 16px);
}

@media (min-width: 860px) {
  .sm-hero {
    min-height: 680px;
    display: flex;
    align-items: center;
    padding-top: var(--section-space-desktop);
  }
}

.sm-hero__shape {
  width: 30rem;
  height: 16rem;
  top: -4rem;
  right: -6rem;
  transform: rotate(-4deg);
}

.sm-hero .block__inner {
  display: grid;
  gap: 40px;
  align-items: center;
  width: 100%;
}

@media (min-width: 860px) {
  .sm-hero .block__inner {
    grid-template-columns: 50% 1fr;
    gap: 48px;
    max-width: var(--shots-max);
  }
}

@media (min-width: 1100px) {
  .sm-hero .block__inner {
    gap: 72px;
  }
}

.sm-hero__text {
  text-align: center;
}

@media (min-width: 860px) {
  .sm-hero__text {
    text-align: left;
  }
}

.sm-hero__intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

@media (min-width: 860px) {
  .sm-hero__intro {
    justify-content: flex-start;
  }
}

.sm-hero__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(43, 32, 19, 0.15);
}

.sm-hero__appname {
  margin: 0;
  font-weight: 700;
  color: var(--sm-ink-deep);
  font-size: 1.05rem;
}

.sm-hero__title {
  font-size: clamp(1.6rem, 4.2vw, 2.4rem);
  color: var(--sm-ink-deep);
  line-height: 1.45;
  margin: 0 auto 14px;
  max-width: 520px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

@media (min-width: 860px) {
  .sm-hero__title {
    margin-left: 0;
  }
}

.sm-hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--sm-gold);
  font-weight: 600;
  margin: 0 auto 10px;
  max-width: var(--text-max);
}

.sm-hero__lead {
  color: var(--ink);
  max-width: var(--text-max);
  margin: 0 auto 28px;
  line-height: 1.85;
}

@media (min-width: 860px) {
  .sm-hero__subtitle,
  .sm-hero__lead {
    margin-left: 0;
  }
}

.sm-hero__cta {
  margin-bottom: 12px;
}

.sm-hero__shot {
  position: relative;
  display: flex;
  justify-content: center;
}

/* ------------------------------------------------------------------------
   2. sm-today
   ---------------------------------------------------------------------- */
.sm-today {
  background: var(--sm-wash-cream);
}

.sm-today::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: -1px;
  height: 56px;
  background: var(--sm-warm-white);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.sm-today .block__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

@media (min-width: 860px) {
  .sm-today .block__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 48px;
    align-items: center;
    max-width: var(--shots-max);
  }
}

.sm-today__copy {
  max-width: var(--text-max);
}

.sm-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sm-field-chips li {
  border: 1px solid var(--sm-gold-soft);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  color: var(--sm-ink-deep);
  font-weight: 600;
  background: #fff;
}

.sm-today__shot {
  display: flex;
  justify-content: center;
}

/* ------------------------------------------------------------------------
   3. sm-review
   ---------------------------------------------------------------------- */
.sm-review {
  background: var(--sm-warm-white);
}

.sm-review__shape {
  width: 22rem;
  height: 26rem;
  left: -7rem;
  top: -3rem;
}

.sm-review__intro {
  max-width: var(--text-max);
  margin: 0 auto 44px;
  text-align: center;
}

.sm-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

@media (min-width: 700px) {
  .sm-steps {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }
}

.sm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1 1 0;
  max-width: 240px;
}

.sm-step__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
  color: var(--sm-ink-deep);
  font-size: 0.92rem;
  text-align: center;
}

.sm-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sm-gold);
  color: #fff;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------------
   4. sm-inlesson (decorative divider — no app screenshot by design)
   ---------------------------------------------------------------------- */
.sm-inlesson {
  background: var(--sm-ink-deep);
  color: #fff;
}

.sm-inlesson__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sm-inlesson__deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
  color: var(--sm-gold);
}

.sm-deco-clock svg,
.sm-deco-pencil svg,
.sm-deco-stand svg {
  width: 30px;
  height: 30px;
  display: block;
}

.sm-deco-line {
  width: 40px;
  height: 1px;
  background: rgba(184, 144, 46, 0.5);
}

.sm-inlesson #sm-inlesson-heading {
  color: #fff;
}

.sm-inlesson__text {
  color: rgba(255, 255, 255, 0.82);
  max-width: var(--text-max);
  margin: 0 auto;
}

/* ------------------------------------------------------------------------
   5. sm-record
   ---------------------------------------------------------------------- */
.sm-record {
  background: var(--sm-wash-orange);
}

.sm-record .block__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

@media (min-width: 860px) {
  .sm-record .block__inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: center;
    max-width: var(--shots-max);
  }
}

.sm-record__shot {
  display: flex;
  justify-content: center;
}

.sm-record__copy {
  max-width: var(--text-max);
}

/* ------------------------------------------------------------------------
   6. sm-material
   ---------------------------------------------------------------------- */
.sm-material {
  background: var(--sm-warm-white);
}

.sm-material__shape {
  width: 18rem;
  height: 18rem;
  right: -5rem;
  bottom: -5rem;
}

.sm-material .block__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

@media (min-width: 860px) {
  .sm-material .block__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    max-width: var(--shots-max);
  }

  /* Alternates left/right against the sm-record block above: text stays
     first in DOM order (reading order, screen readers), screenshots move
     to the left visually here. */
  .sm-material__shots {
    order: -1;
  }
}

.sm-material__copy {
  max-width: var(--text-max);
}

.sm-material__shots {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 620px) {
  .sm-material__shots {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
  }
}

/* ------------------------------------------------------------------------
   7. sm-schedule
   ---------------------------------------------------------------------- */
.sm-schedule {
  background: var(--sm-wash-green);
}

.sm-schedule::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: -1px;
  height: 56px;
  background: var(--sm-warm-white);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.sm-schedule__lead {
  text-align: center;
  margin: 0 auto 40px;
  max-width: var(--text-max);
}

.sm-steps--schedule {
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------------
   8. sm-features
   ---------------------------------------------------------------------- */
.sm-features {
  background: var(--sm-wash-cream);
}

.sm-features__lead {
  text-align: center;
  color: var(--ink-soft);
  max-width: var(--text-max);
  margin: 0 auto 40px;
  line-height: 1.85;
}

.sm-features__grid {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 32px 28px;
}

@media (min-width: 620px) {
  .sm-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .sm-features__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding-top: 18px;
  border-top: 1px solid var(--sm-gold-soft);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--sm-gold);
  margin-bottom: 12px;
}

.feature__icon svg {
  width: 18px;
  height: 18px;
}

.feature__title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--sm-ink-deep);
}

.feature__text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.75;
}

.feature__shot {
  display: block;
  width: 120px;
  height: auto;
  margin: 14px 0 0;
  border-radius: 14px;
  border: 1px solid var(--sm-gold-soft);
  box-shadow: 0 8px 20px rgba(43, 32, 19, 0.12);
}

.sm-features__note {
  margin: 0 auto;
  max-width: var(--shots-max);
  padding: 16px 20px;
  border: 1px solid var(--sm-gold-soft);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.75;
  text-align: center;
}

/* ------------------------------------------------------------------------
   9. sm-final-cta
   ---------------------------------------------------------------------- */
.sm-final-cta {
  background: var(--sm-ink-deep);
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.sm-final-cta__shape {
  width: 26rem;
  height: 14rem;
  left: -8rem;
  bottom: -6rem;
  transform: rotate(3deg);
  opacity: 0.7;
}

.sm-final-cta .block__inner {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sm-final-cta__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.sm-final-cta__title {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}

.sm-final-cta__lead {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  max-width: var(--text-max);
}

.sm-final-cta__note {
  color: rgba(255, 255, 255, 0.75);
  margin-top: 14px;
}

.sm-final-cta__links {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.sm-final-cta__links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.sm-final-cta__links a:hover,
.sm-final-cta__links a:focus-visible {
  color: #fff;
  border-color: #fff;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sm-final-cta a:focus-visible {
  outline-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .sm-shape {
    transition: none !important;
  }
}
