/* ══════════════════════════════════════════════════════════════
   Tislina – The Art of the Roast
   Stylesheet — minimalist, elegant, espresso-cream-gold palette
   ══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ────────────────────────────────────────────── */
:root {
  --c-espresso:    #2C1A0E;
  --c-deep:        #120800;
  --c-cream:       #F5ECD7;
  --c-cream-muted: #E0CEB5;
  --c-gold:        #C9A84C;
  --c-gold-light:  #DFC07A;
  --c-grey-footer: #A0998A;
  --c-overlay-1:   rgba(18,  8,  0, 0.60);
  --c-overlay-2:   rgba(26, 10,  0, 0.72);
  --c-overlay-3:   rgba(44, 26, 14, 0.82);
  --c-gold-border: rgba(201, 168, 76, 0.30);

  --ff-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ff-sans:  'Lato', system-ui, -apple-system, sans-serif;

  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background-color: var(--c-deep);
  color: var(--c-cream);
  font-family: var(--ff-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  /*
   * Hero image: steam rising from a dark ceramic cup on marble.
   * Sourced from Unsplash (free for use). Swap the URL with your
   * own licensed photograph before going live.
   */
  background-image: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=2560&q=90');
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Dark espresso gradient overlay for legibility */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    var(--c-overlay-1)  0%,
    var(--c-overlay-2) 45%,
    var(--c-overlay-3) 100%
  );
  z-index: 1;
}

/* Centred content column */
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 680px;
  width: 100%;

  animation: fadeUp 1.4s var(--ease-smooth) both;
}

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

/* ── Wordmark ── */
.hero__wordmark {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.58rem, 1.6vw, 0.72rem);
  letter-spacing: 0.60em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1.6rem;
  user-select: none;
}

/* ── Rules ── */
.hero__rule {
  display: block;
  border: none;
}

.hero__rule--thin {
  width: 36px;
  height: 1px;
  background-color: var(--c-gold);
  opacity: 0.45;
  margin-bottom: 2rem;
}

.hero__rule--gold {
  width: 90px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--c-gold),
    transparent
  );
  margin-bottom: 2rem;
}

/* ── Main headline ── */
.hero__headline {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.8rem, 7.5vw, 5.6rem);
  line-height: 1.12;
  color: var(--c-cream);
  letter-spacing: 0.015em;
  margin-bottom: 1.5rem;
}

/* ── Coming Soon subtitle ── */
.hero__coming-soon {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(0.58rem, 1.5vw, 0.70rem);
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 2.2rem;
}

/* ── Micro copy ── */
.hero__micro {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  color: var(--c-cream-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2.6rem;
  opacity: 0.88;
}

/* ─── Email Signup Form ─────────────────────────────────────────── */
.hero__form {
  width: 100%;
  max-width: 460px;
}

.form__group {
  display: flex;
  border: 1px solid var(--c-gold-border);
  border-radius: 2px;
  overflow: hidden;

  /* Frosted-glass feel on the input row */
  background: rgba(245, 236, 215, 0.055);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  transition: border-color 0.28s var(--ease-smooth),
              box-shadow  0.28s var(--ease-smooth);
}

.form__group:focus-within {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.18);
}

.form__input {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 1.15rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-cream);
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

.form__input::placeholder {
  color: rgba(245, 236, 215, 0.38);
  font-style: italic;
}

.form__input[aria-invalid='true'] {
  color: #f0bba8;
}

.form__btn {
  flex-shrink: 0;
  padding: 0.9rem 1.7rem;
  background-color: var(--c-gold);
  color: var(--c-deep);
  border: none;
  cursor: pointer;
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.24s var(--ease-smooth),
              color          0.24s var(--ease-smooth);
}

.form__btn:hover,
.form__btn:focus-visible {
  background-color: var(--c-gold-light);
  outline: none;
}

.form__btn:active {
  background-color: var(--c-gold);
}

.form__error {
  margin-top: 0.6rem;
  font-family: var(--ff-sans);
  font-size: 0.74rem;
  font-weight: 300;
  letter-spacing: 0.025em;
  color: #eba898;
  min-height: 1.1em;
  text-align: left;
  padding-left: 0.15rem;
}

/* ─── Success State ─────────────────────────────────────────────── */
.hero__success {
  animation: fadeUp 0.9s var(--ease-smooth) both;
}

.hero__success-msg {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.4rem, 3.8vw, 2rem);
  color: var(--c-cream);
  letter-spacing: 0.025em;
  margin-bottom: 0.55rem;
}

.hero__success-sub {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--c-gold);
}

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  padding: 0.85rem 1.5rem;
  text-align: center;
  background-color: var(--c-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.footer p {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  color: var(--c-grey-footer);
}

.footer__link {
  color: var(--c-grey-footer);
  text-decoration: none;
  border-bottom: 1px solid rgba(160, 153, 138, 0.25);
  transition: color        0.22s var(--ease-smooth),
              border-color 0.22s var(--ease-smooth);
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--c-gold);
  border-bottom-color: rgba(201, 168, 76, 0.50);
  outline: none;
}

/* ─── Responsive ────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
  .hero__content {
    padding: 2.5rem 1.5rem;
    max-width: 560px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero__content {
    padding: 2rem 1.25rem;
  }

  /* Stack the form vertically on small screens */
  .form__group {
    flex-direction: column;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .form__btn {
    width: 100%;
    padding: 0.9rem 1rem;
    border-top: 1px solid rgba(201, 168, 76, 0.18);
  }

  .form__error {
    text-align: center;
    padding-left: 0;
  }

  .hero__rule--gold {
    width: 60px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .hero__wordmark {
    letter-spacing: 0.40em;
  }

  .hero__coming-soon {
    letter-spacing: 0.38em;
  }
}

/* ─── Language Switcher ─────────────────────────────────────────── */
.lang-switcher {
  position: fixed;
  top: 1.4rem;
  right: 1.4rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 236, 215, 0.42);
  padding: 0.3rem 0.15rem;
  line-height: 1;
  transition: color 0.22s var(--ease-smooth);
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--c-cream);
  outline: none;
}

.lang-btn--active {
  color: var(--c-gold);
}

.lang-sep {
  font-size: 0.55rem;
  color: rgba(245, 236, 215, 0.18);
  user-select: none;
}

/* ─── Arabic / RTL overrides ────────────────────────────────────── */

/* Headline: swap to Cairo (Cormorant has no Arabic glyphs) */
[dir="rtl"] .hero__headline {
  font-family: 'Cairo', sans-serif;
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.22;
}

/* Micro italic copy */
[dir="rtl"] .hero__micro {
  font-family: 'Cairo', sans-serif;
  font-style: normal;
  letter-spacing: 0;
}

/* Reduce large letter-spacing on "Coming Soon" label */
[dir="rtl"] .hero__coming-soon {
  letter-spacing: 0.12em;
}

/* Success message */
[dir="rtl"] .hero__success-msg {
  font-family: 'Cairo', sans-serif;
  font-style: normal;
  letter-spacing: 0;
}

/* Input text direction and font */
[dir="rtl"] .form__input {
  text-align: right;
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0;
}

/* Inline error alignment */
[dir="rtl"] .form__error {
  text-align: right;
  padding-left: 0;
  padding-right: 0.15rem;
}

/* Keep lang switcher at top-right regardless of doc direction */
[dir="rtl"] .lang-switcher {
  right: 1.4rem;
  left: auto;
}
