/**
 * Itoshii — Early Access Landing Page Stylesheet
 * Brand colors, responsive layout, micro-interactions
 */

:root {
  color-scheme: light;
  --indigo: #4B3BFF;
  --lime: #D6FF4B;
  --ink: #1A1440;
  --haze: #6B66A0;
  --lilac: #E2E0FF;
  --surface: #F3F2FF;
  --surface-2: #ECEBFF;
  --paper: #FFFFFF;
  --error: #C42B4B;
  --radius: 16px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--indigo);
}

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

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  padding: 22px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.lockup svg {
  width: 36px;
  height: 36px;
}

.lockup span {
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-link {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.brand-link:hover {
  background: var(--surface);
}

.header-cta {
  font-weight: 600;
  text-decoration: none;
  color: var(--paper);
  background: var(--indigo);
  padding: 10px 18px;
  border-radius: 999px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.header-cta:hover {
  box-shadow: 0 6px 18px rgba(75, 59, 255, 0.28);
}

/* ==========================================================================
   Hero Section & WhatsApp Interactive Demo
   ========================================================================== */

.hero {
  padding: 40px 0 88px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
  margin: 0 0 20px;
}

.hero h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 24px;
  max-width: 12ch;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--haze);
  max-width: 46ch;
  margin: 0 0 40px;
}

/* Interactive WhatsApp Demo Mockup */
.chat {
  background: var(--surface);
  border-radius: 24px;
  padding: 22px;
  max-width: 440px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.chat-head svg {
  width: 30px;
  height: 30px;
}

.chat-head strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-head small {
  display: block;
  color: var(--haze);
  font-size: 0.8rem;
}

.bubble {
  background: var(--paper);
  border-radius: 4px 16px 16px 16px;
  padding: 14px 16px;
  font-size: 0.95rem;
  max-width: 92%;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.choice {
  font: inherit;
  background: var(--paper);
  border: 0;
  border-radius: 12px;
  padding: 12px 8px 10px;
  cursor: pointer;
  text-align: center;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  position: relative;
}

.choice .ico {
  display: block;
  margin: 0 auto 6px;
  width: 34px;
  height: 34px;
}

.choice:hover {
  transform: translateY(-2px);
}

.choice[aria-pressed="true"] {
  background: var(--lime);
}

.choice.tapping {
  transform: scale(0.93);
}

.choice.tapping::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: rgba(75, 59, 255, 0.28);
  animation: tap 0.55s ease-out forwards;
}

@keyframes tap {
  from { transform: scale(0.4); opacity: 1; }
  to { transform: scale(2.4); opacity: 0; }
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 1.2em;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--haze);
  animation: dot 1s infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.reply, .chat-note {
  transition: opacity 0.3s;
}

.fade {
  opacity: 0;
}

.reply {
  margin: 12px 0 0 auto;
  background: var(--lilac);
  border-radius: 16px 4px 16px 16px;
  padding: 12px 16px;
  font-size: 0.95rem;
  max-width: 80%;
  width: fit-content;
  min-height: 1.5em;
}

.reply[hidden] {
  display: none;
}

.chat-note {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--haze);
}

/* ==========================================================================
   Cards & Form Controls
   ========================================================================== */

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 2px rgba(26, 20, 64, 0.06), 0 12px 40px rgba(75, 59, 255, 0.10);
}

.card h2 {
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.card .sub {
  color: var(--haze);
  margin: 0 0 24px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.field .opt {
  color: var(--haze);
  font-weight: 400;
}

.input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  min-height: 48px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B66A0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.input::placeholder, textarea::placeholder {
  color: var(--haze);
  opacity: 1;
}

/* An unselected dropdown reads as a placeholder, not a chosen value */
select:invalid {
  color: var(--haze);
}

select option {
  color: var(--ink);
}

.input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--indigo);
  outline-offset: 0;
  background: var(--paper);
}

.phone {
  display: flex;
  gap: 8px;
}

.phone .cc {
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border-radius: 12px;
  font-weight: 500;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--haze);
  margin: 6px 0 12px;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--indigo);
  flex: 0 0 20px;
}

.error {
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}

.field.invalid .error {
  display: block;
}

.field.invalid .input, .field.invalid select, .field.invalid textarea {
  outline: 2px solid var(--error);
}

.check-wrap.invalid .error {
  display: block;
}

.form-alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.45;
}

.form-alert-error {
  background: #FDF2F4;
  color: var(--error);
  border: 1px solid rgba(196, 43, 75, 0.25);
}

.form-alert[hidden] {
  display: none !important;
}

.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  width: 100%;
  background: var(--indigo);
  color: var(--paper);
  border-radius: 999px;
  padding: 15px 24px;
  min-height: 52px;
  margin-top: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(75, 59, 255, 0.28);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.success {
  display: none;
  text-align: left;
}

.success.show {
  display: block;
  animation: successFadeIn 0.35s ease-out;
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success .tick {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--lime);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.success h3 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.success p {
  color: var(--haze);
  margin: 0;
  line-height: 1.55;
}

/* ==========================================================================
   Occasion Lines Section
   ========================================================================== */

.lines {
  padding: 88px 0;
  background: var(--surface);
}

.section-title {
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 12px;
  max-width: 22ch;
}

.section-lede {
  color: var(--haze);
  font-size: 1.1rem;
  max-width: 56ch;
  margin: 0 0 48px;
}

.line-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.line {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
}

.line h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.line .for {
  font-size: 0.85rem;
  color: var(--indigo);
  font-weight: 600;
  margin: 0 0 14px;
}

.line p {
  margin: 0;
  color: var(--haze);
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */

.how {
  padding: 88px 0;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--lime);
  font-weight: 700;
  margin-bottom: 16px;
}

.steps h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.steps p {
  margin: 0;
  color: var(--haze);
  font-size: 0.95rem;
}

/* ==========================================================================
   Brand Partnerships Section
   ========================================================================== */

.brands {
  padding: 88px 0 104px;
  background: var(--surface);
}

.brands .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.perks {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 18px;
}

.perks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
}

.perks svg {
  width: 28px;
  height: 28px;
}

.perks strong {
  display: block;
  font-weight: 600;
}

.perks span {
  color: var(--haze);
  font-size: 0.95rem;
}

/* ==========================================================================
   Careers Section
   ========================================================================== */

.careers {
  padding: 88px 0 104px;
}

.careers .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.roles {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.role {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  animation: roleFadeIn 0.35s ease-out;
}

@keyframes roleFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.role-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.role h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.role .meta {
  font-size: 0.88rem;
  color: var(--indigo);
  font-weight: 500;
  margin: 0;
}

.role ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--haze);
  font-size: 0.95rem;
}

.role li + li {
  margin-top: 4px;
}

.role .role-desc {
  margin: 12px 0 0;
  color: var(--haze);
  font-size: 0.95rem;
  line-height: 1.5;
}

.apply-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  background: var(--paper);
  color: var(--indigo);
  border-radius: 999px;
  padding: 9px 16px;
  transition: background-color 0.2s, color 0.2s;
}

.apply-btn:hover {
  background: var(--lime);
  color: var(--ink);
}

/* Dynamic roles skeleton loading & empty states */
.role-skeleton {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.skeleton-shimmer {
  background: linear-gradient(90deg, var(--surface-2) 0%, #FFFFFF 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite ease-in-out;
  border-radius: 6px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-title {
  width: 55%;
  height: 22px;
}

.skeleton-pill {
  width: 72px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
}

.skeleton-meta {
  width: 40%;
  height: 14px;
}

.skeleton-text {
  width: 90%;
  height: 13px;
}

.skeleton-text.short {
  width: 65%;
}

.roles-empty {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--haze);
  font-size: 0.95rem;
}

.roles-empty p {
  margin: 0;
}

.careers-note {
  margin: 20px 0 0;
  color: var(--haze);
  font-size: 0.95rem;
}

.careers .card {
  position: sticky;
  top: 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 40px 0 48px;
  font-size: 0.88rem;
  color: var(--haze);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.site-footer .co {
  font-weight: 700;
  color: var(--ink);
}

.site-footer a {
  color: var(--haze);
}

/* ==========================================================================
   Responsive & Accessibility
   ========================================================================== */

@media (max-width: 900px) {
  .hero .wrap, .brands .wrap, .careers .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .careers .card {
    position: static;
  }
  .line-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 16px 0 64px;
  }
  .card {
    padding: 24px 20px;
  }
  .row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .lines, .how, .brands, .careers {
    padding: 64px 0;
  }
  .nav-careers {
    display: none;
  }
  .role-top {
    flex-direction: column;
    gap: 12px;
  }
  .header-cta {
    display: none;
  }
  .brand-link {
    padding: 8px 12px;
    font-size: 0.9rem;
    background: var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
